:root {
  --bg: #f4f6f8; --panel: #ffffff; --ink: #17212b; --muted: #6f7d89; --line: #e6eaee;
  --accent: #ef6845; --accent-soft: #fff1ed; --green: #2e8b6d; --green-soft: #e9f6f0;
  --amber: #b7791f; --amber-soft: #fff7e5; --navy: #202d36; --shadow: 0 8px 24px rgba(22, 34, 43, .05);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--bg); font-synthesis: none; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
.order-quantity { font-weight: 700; font-variant-numeric: tabular-nums; }
body { margin: 0; min-width: 1080px; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; background: var(--navy); color: #dce5e9; display: flex; flex-direction: column; padding: 24px 14px 16px; flex: 0 0 244px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; color: #fff; letter-spacing: .06em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--accent); border-radius: 8px; color: white; }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2.2; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-size: 14px; font-weight: 750; }
.brand small { font-size: 9px; letter-spacing: .17em; margin-top: 5px; opacity: .64; }
.workspace { display: flex; align-items: center; gap: 8px; margin: 0 5px 20px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; color: #f3f7f8; font-size: 12px; }
.workspace svg { width: 14px; margin-left: auto; opacity: .6; }.pulse-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #67c594; display: inline-block; flex: 0 0 auto; }.status-dot.muted { background: #aeb9bd; }.pulse-dot { box-shadow: 0 0 0 3px rgba(103,197,148,.15); }
.nav { display: grid; gap: 4px; }.nav-item { min-height: 42px; width: 100%; display: flex; align-items: center; gap: 11px; padding: 0 11px; color: #afbdc4; background: transparent; border: 0; border-radius: 7px; text-align: left; font-size: 13px; }.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8; }.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }.nav-item.active { color: #fff; background: rgba(239,104,69,.18); box-shadow: inset 3px 0 0 var(--accent); }.nav-item em { margin-left: auto; min-width: 22px; padding: 3px 5px; text-align: center; border-radius: 10px; color: #fff; background: var(--accent); font-size: 10px; font-style: normal; }.nav-item kbd { margin-left: auto; opacity: .45; font-size: 10px; }.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }.sidebar-bottom .nav-item { margin-bottom: 4px; }.sidebar-bottom .nav-item span:nth-child(2) { margin-left: auto; }.agent-card { display: flex; gap: 9px; align-items: center; padding: 11px 8px; border-top: 1px solid rgba(255,255,255,.1); }.agent-avatar { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: #49606b; font-size: 10px; font-weight: 700; }.agent-card strong,.agent-card small { display:block; }.agent-card strong { font-size: 11px; color: #f5f8f8; }.agent-card small { color: #8fa1a9; font-size: 10px; margin-top: 3px; }.agent-card .icon-btn { margin-left: auto; }
.main { min-width: 0; flex: 1; padding: 0 34px 42px; }.topbar { height: 105px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .18em; }.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }.top-actions { display: flex; align-items: center; gap: 9px; }.connection-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; color: var(--muted); font-size: 11px; }.btn { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 650; transition: .18s ease; }.btn svg { width: 15px; height: 15px; }.btn.secondary { border-color: var(--line); background: var(--panel); color: var(--ink); }.btn.secondary:hover { border-color: #cbd4da; background: #fafbfb; }.btn.primary { background: var(--accent); color: #fff; }.btn.primary:hover { background: #db5938; }.btn.primary:disabled,.btn.secondary:disabled,.btn.danger-ghost:disabled { opacity: .45; cursor: not-allowed; }.btn.danger-ghost { color: #b44a34; border-color: #f5d1c9; background: var(--accent-soft); }.btn.danger-ghost.active { color: #fff; background: #bb4f37; border-color: #bb4f37; }.notice { margin: 18px 0 -2px; padding: 11px 13px; border-radius: 6px; background: var(--amber-soft); color: #815c1d; border: 1px solid #f3dfad; font-size: 12px; }.notice.hidden { display: none; }
.view { padding-top: 25px; }.view-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 17px; }.view-head h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }.view-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }.section-label { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; margin: 25px 0 11px; }.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--panel); border-radius: 8px; box-shadow: var(--shadow); }.kpi { min-height: 118px; padding: 18px 20px; border-right: 1px solid var(--line); }.kpi:last-child { border-right: 0; }.kpi-label { color: var(--muted); font-size: 11px; display: flex; gap: 7px; align-items: center; }.kpi-label svg { width: 14px; height: 14px; }.kpi-value { margin-top: 15px; font-size: 27px; letter-spacing: -.05em; font-weight: 700; }.kpi-meta { margin-top: 7px; color: var(--muted); font-size: 10px; }.kpi-meta.good { color: var(--green); }.kpi-meta.warn { color: var(--amber); }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .9fr); gap: 20px; align-items: start; }.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }.panel-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 17px; border-bottom: 1px solid var(--line); }.panel-head h3 { margin: 0; font-size: 13px; }.panel-head small { color: var(--muted); font-size: 10px; }.panel-pad { padding: 17px; }.mini-link { color: var(--accent); background: transparent; border: 0; font-size: 11px; padding: 3px; }.mini-link:hover { text-decoration: underline; }.table-wrap { overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; }.data-table th { height: 39px; padding: 0 15px; color: var(--muted); font-size: 10px; font-weight: 650; text-align: left; white-space: nowrap; background: #fafbfb; }.data-table td { height: 57px; padding: 0 15px; border-top: 1px solid #eef1f3; font-size: 11px; white-space: nowrap; }.data-table tbody tr:hover { background: #fcfdfd; }.data-table th:first-child,.data-table td:first-child { padding-left: 17px; }.order-main strong { font-size: 11px; font-weight: 650; display: block; }.order-main small { color: var(--muted); font-size: 10px; display: block; margin-top: 4px; }.order-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 10px; }.amount { font-weight: 700; }.checkbox { width: 15px; height: 15px; accent-color: var(--accent); vertical-align: middle; }.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; font-size: 10px; font-weight: 650; }.status-check-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }.badge.orange { color: #b65035; background: var(--accent-soft); }.badge.green { color: #267558; background: var(--green-soft); }.badge.gray { color: #6e7b84; background: #eef1f3; }.badge.amber { color: #8a621b; background: var(--amber-soft); }.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 12px; }.empty svg { width: 25px; margin-bottom: 8px; opacity: .5; }
.rule-summary { display: grid; gap: 10px; }.rule-line { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f3; font-size: 11px; }.rule-line:last-child { border-bottom: 0; }.rule-line span:first-child { color: var(--muted); }.rule-line strong { text-align: right; font-weight: 650; }.copyable-value { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }.copyable-value strong { overflow-wrap: anywhere; }.copyable-value .icon-btn { flex: 0 0 28px; width: 28px; height: 28px; }.copyable-value .icon-btn:disabled { opacity: .35; cursor: not-allowed; }.mode-line { display: flex; align-items: center; gap: 7px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }.mode-line small { color: var(--muted); font-size: 10px; margin-right: auto; }.mode-pill { border: 0; padding: 5px 8px; border-radius: 4px; background: #f1f3f4; color: var(--muted); font-size: 10px; }.mode-pill.active { color: #fff; background: var(--accent); }.health { display: flex; align-items: center; gap: 9px; padding: 13px 0 1px; }.health strong { font-size: 12px; }.health small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }.health-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--green-soft); color: var(--green); }.health-mark svg { width: 16px; }
.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 13px; }.search { position: relative; flex: 0 0 250px; }.search svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--muted); }.search input { width: 100%; height: 34px; padding: 0 10px 0 31px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-size: 11px; outline: 0; }.search input:focus, input:focus, textarea:focus, select:focus { border-color: #d99282; box-shadow: 0 0 0 3px rgba(239,104,69,.1); }.tabs { display: flex; gap: 2px; padding: 3px; background: #e9edef; border-radius: 6px; }.tab { min-height: 28px; border: 0; padding: 0 10px; color: var(--muted); background: transparent; border-radius: 4px; font-size: 10px; }.tab.active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(22,34,43,.08); }.toolbar .spacer { flex: 1; }.selection-note { font-size: 10px; color: var(--muted); }.table-panel { overflow: hidden; }.table-actions { display: flex; gap: 8px; align-items: center; }.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; color: var(--muted); }.icon-btn:hover { color: var(--ink); border-color: #c6d0d6; }.icon-btn svg { width: 15px; height: 15px; }.icon-btn.ghost { border-color: transparent; background: transparent; color: #9cb0b8; }.icon-btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }.row-action { border: 0; color: var(--accent); background: transparent; font-size: 10px; padding: 4px; }.row-action:disabled { color: #aab4b9; cursor: not-allowed; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 20px; }.form-panel { padding: 20px; }.form-panel h3 { margin: 0; font-size: 14px; }.form-panel .sub { margin: 6px 0 20px; color: var(--muted); font-size: 11px; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.field { margin-bottom: 15px; }.field label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #42515b; font-size: 11px; font-weight: 650; }.field label small { color: var(--muted); font-weight: 400; }.field input,.field select,.field textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); outline: 0; font-size: 11px; }.field input,.field select { height: 35px; padding: 0 10px; }.field textarea { min-height: 76px; resize: vertical; padding: 9px 10px; }.input-hint { color: var(--muted); font-size: 10px; margin-top: 5px; }.chips { display: flex; min-height: 35px; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }.chips input { flex: 1; min-width: 120px; height: 23px; padding: 0 3px; border: 0; outline: 0; font-size: 11px; }.chip { display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 7px; color: #8c4b39; border-radius: 4px; background: var(--accent-soft); font-size: 10px; }.chip button { border: 0; padding: 0; background: transparent; color: inherit; display: grid; }.chip svg { width: 12px; height: 12px; }.switch-line { display: flex; align-items: center; gap: 9px; min-height: 35px; }.switch { appearance: none; width: 34px; height: 20px; border: 0; border-radius: 20px; background: #ccd5d9; position: relative; transition: .18s; }.switch::after { content: ''; width: 16px; height: 16px; border-radius: 50%; position: absolute; left: 2px; top: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .18s; }.switch:checked { background: var(--green); }.switch:checked::after { transform: translateX(14px); }.switch-label { color: var(--muted); font-size: 11px; }.form-footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding-top: 17px; margin-top: 5px; }.callout { padding: 13px; background: #f8fafb; border-left: 3px solid #ccd7db; color: var(--muted); font-size: 11px; line-height: 1.65; }.callout strong { color: var(--ink); }.security-list { margin: 17px 0 0; padding: 0; list-style: none; display: grid; gap: 13px; }.security-list li { display: flex; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.55; }.security-list svg { flex: 0 0 auto; width: 15px; color: var(--green); margin-top: 1px; }.danger-zone { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }.danger-zone h4 { margin: 0 0 7px; color: #9c4b39; font-size: 12px; }.danger-zone p { margin: 0 0 10px; color: var(--muted); font-size: 10px; }
.log-table td { height: 50px; }.log-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: var(--muted); }.log-message { color: #4b5961; }.log-icon { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 5px; }.log-icon svg { width: 13px; height: 13px; }.log-icon.success { color: var(--green); background: var(--green-soft); }.log-icon.warn { color: var(--amber); background: var(--amber-soft); }.log-icon.info { color: #54717f; background: #edf3f5; }.log-icon.error { color: #b5503a; background: var(--accent-soft); }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: rgba(21,31,37,.42); }.modal { width: min(520px, 100%); background: #fff; border-radius: 9px; box-shadow: 0 22px 70px rgba(17,28,35,.22); }.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }.modal-head h3 { margin: 0; font-size: 15px; }.modal-head-actions { display: flex; align-items: center; gap: 8px; }.modal-body { padding: 20px; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }.toast-root { position: fixed; z-index: 20; right: 22px; bottom: 22px; display: grid; gap: 8px; }.toast { min-width: 240px; max-width: 380px; padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; background: #fff; box-shadow: 0 10px 30px rgba(20,30,38,.14); color: var(--ink); font-size: 11px; animation: toast-in .18s ease-out; }.toast.success { border-left-color: var(--green); }.toast.error { border-left-color: #c0543b; }.toast small { display: block; color: var(--muted); margin-top: 4px; }.hidden { display: none !important; }
.auth-screen { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 36px 16px; }
.auth-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.auth-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-card h2 { margin: 0; font-size: 22px; }
.auth-card > p { margin: 8px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-card form .btn { width: 100%; margin-top: 4px; }
.auth-card [data-auth-error] { margin-top: 14px; border-left-color: #c0543b; color: #a14444; }
.auth-required .sidebar, .auth-required .topbar { display: none; }
.province-sales-view .sales-kpis { margin: 16px 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1180px) { body { min-width: 960px; }.sidebar { width: 218px; flex-basis: 218px; }.main { padding-left: 24px; padding-right: 24px; }.kpi { padding-left: 15px; padding-right: 15px; }.grid-two,.form-layout { grid-template-columns: 1fr; } }
.badge.blue { color: #316990; background: #e8f2f9; }.badge.red { color: #a14444; background: #fbeaea; }.login-actions { display: flex; gap: 9px; margin: 16px 0 20px; flex-wrap: wrap; }.login-actions .btn { flex: 1; min-width: 170px; justify-content: center; }.form-panel textarea + textarea { margin-top: 8px; }
.check-col { width: 38px; }.kpi-status { margin-top: 20px; font-size: 19px; }.mode-tabs { width: max-content; }
.log-icon-col { width: 42px; }
@media (max-width: 860px) {
  body { min-width: 0; }
  .app-shell { display: block; }
  .sidebar { width: 100%; padding: 14px 12px 10px; }
  .brand { padding-bottom: 14px; }
  .workspace { margin-bottom: 10px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav-item { flex: 0 0 auto; width: auto; min-height: 36px; }
  .nav-item kbd { display: none; }
  .sidebar-bottom { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
  .sidebar-bottom .nav-item { flex: 1; }
  .agent-card { flex: 0 0 auto; border-top: 0; padding: 4px 0 4px 8px; }
  .main { padding: 0 14px 28px; }
  .topbar { min-height: 92px; height: auto; padding: 18px 0; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .view-head { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  .toolbar .spacer { display: none; }
  .search { flex: 1 1 220px; }
  .grid-two .panel, .table-panel { overflow-x: auto; }
  .grid-two > .panel, .form-layout > .panel { min-width: 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
.shipment-table-wrap { overflow-x: auto; }
.shipment-table { min-width: 1150px; table-layout: fixed; }
.shipment-table:not(.shipped-table) { min-width: 2350px; }
.shipped-table { min-width: 1920px; }
.shipment-table th:nth-child(1) { width: 150px; }
.shipment-table th:nth-child(2) { width: 100px; }
.shipment-table th:nth-child(3) { width: 270px; }
.shipment-table th:nth-child(4) { width: 125px; }
.shipment-table th:nth-child(5) { width: 190px; }
.shipment-table th:nth-child(6) { width: 88px; }
.shipment-table th:nth-child(7) { width: 125px; }
.shipment-table th:nth-child(8) { width: 102px; }
.shipment-table:not(.shipped-table) th:nth-child(1) { width: 44px; }
.shipment-table:not(.shipped-table) th:nth-child(2) { width: 150px; }
.shipment-table:not(.shipped-table) th:nth-child(3) { width: 110px; }
.shipment-table:not(.shipped-table) th:nth-child(4) { width: 280px; }
.shipment-table:not(.shipped-table) th:nth-child(5) { width: 135px; }
.shipment-table:not(.shipped-table) th:nth-child(6) { width: 210px; }
.shipment-table:not(.shipped-table) th:nth-child(7) { width: 90px; }
.shipment-table:not(.shipped-table) th:nth-child(8) { width: 155px; }
.shipment-table:not(.shipped-table) th:nth-child(9) { width: 125px; }
.shipment-table:not(.shipped-table) th:nth-child(10) { width: 190px; }
.shipment-table:not(.shipped-table) th:nth-child(11), .shipment-table:not(.shipped-table) th:nth-child(12) { width: 170px; }
.shipment-table:not(.shipped-table) th:nth-child(13) { width: 160px; }
.shipment-table:not(.shipped-table) th:nth-child(14) { width: 190px; }
.shipment-table:not(.shipped-table) th:nth-child(15) { width: 130px; }
.shipment-table:not(.shipped-table) th:nth-child(16) { width: 150px; }
.shipment-table .pending-selected { background: #fff5ee; }
.shipment-table .pending-selected:hover { background: #fff0e5; }
.shipment-table .has-waybill-row { background: #f5effb; color: #5f397c; }
.shipment-table .shipped-sn-match-row { background: #fff4d6; box-shadow: inset 4px 0 0 #d08a20; }
.shipment-table .shipped-sn-match-row:hover { background: #ffefc2; }
.shipped-sn-lookup { flex: 0 1 330px; }
.shipment-table .has-waybill-row:hover { background: #eee3f8; }
.shipment-table .has-waybill-row.after-sale-row { background: #f8eafa; color: #713a83; }
.shipment-table .has-waybill-row .order-id, .shipment-table .has-waybill-row .copy-value { color: #70418d; }
.copy-value { border: 0; padding: 0; background: transparent; cursor: copy; font: inherit; text-align: left; }
.copy-value:hover { text-decoration: underline; }
.shipment-order-cell { cursor: pointer; }
.shipment-order-cell:hover { background: rgba(112,65,141,.06); }
.view-head { flex-wrap: wrap; gap: 14px; }
.view-head > .table-actions { flex-wrap: wrap; }
.view-head .btn { padding-top: 7px; padding-bottom: 7px; }
.product-color-text.color-米色 { color: #786446; }
.product-color-text.color-粉色 { color: #a5365b; }
.product-color-text.color-黄色 { color: #806400; }
.product-color-text.color-紫色 { color: #6f499a; }

.local-shipping-view { letter-spacing: 0; }
.local-shipping-toolbar { gap: 12px; }
.local-shipping-toolbar .tabs { flex-wrap: wrap; }
.local-timing-filters { flex-wrap: wrap; margin-top: 16px; }
.local-date-inputs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); }
.local-date-inputs label { display: flex; align-items: center; gap: 6px; }
.local-date-inputs input { min-height: 34px; width: 140px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); }
.local-shipping-kpis { gap: 0; margin-top: 16px; border-block: 1px solid var(--line); }
.local-shipping-kpis .sales-kpi { min-width: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.local-shipping-kpis .sales-kpi:last-child { border-right: 0; }
.local-shipping-kpis .sales-kpi > div { min-width: 0; overflow-wrap: anywhere; }
.local-shipping-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; }
.local-shipping-grid > .panel { min-width: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.local-summary-table.province-timing-table { min-width: 850px; }
.province-timing-table th, .province-timing-table td { white-space: nowrap; }
.province-timing-table td:last-child { white-space: normal; min-width: 210px; }
.local-shipping-view .panel-head { padding-inline: 0; }
.local-shipping-view .panel-head small { display: block; margin-top: 5px; }
.local-summary-table { min-width: 430px; }
.local-summary-table td { padding: 12px; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.local-summary-table .product-color-swatch { display: inline-block; margin-right: 6px; }
.recipient-summary-panel { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.pending-recipient-summary { margin-top: 16px; }
.recipient-summary-list { display: grid; gap: 18px; }
.recipient-summary-group { min-width: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.recipient-summary-group:first-child { border-top: 0; padding-top: 0; }
.recipient-summary-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.recipient-summary-heading > div { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.recipient-summary-heading strong { color: var(--ink); }
.recipient-summary-heading span { color: var(--muted); overflow-wrap: anywhere; }
.recipient-summary-heading small { color: var(--muted); white-space: nowrap; }
.recipient-summary-table { min-width: 430px; }
.recipient-summary-collapsible > summary { list-style: none; cursor: pointer; user-select: none; }
.recipient-summary-collapsible > summary::-webkit-details-marker { display: none; }
.recipient-summary-collapsible > summary::after { content: ''; flex: 0 0 8px; width: 8px; height: 8px; margin: 0 4px 4px 8px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); transition: transform .16s ease; }
.recipient-summary-collapsible[open] > summary::after { margin-bottom: 0; transform: rotate(225deg); }
.recipient-summary-collapsible[open] > summary { margin-bottom: 10px; }
.recipient-summary-panel > summary { border-bottom: 0; }
.recipient-summary-panel[open] > summary { border-bottom: 1px solid var(--line); }
.local-product-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; line-height: 1.6; }
.local-product-line + .local-product-line { margin-top: 7px; }
.local-product-line small { color: var(--muted); white-space: nowrap; }
.local-shipping-detail { min-width: 0; margin-top: 24px; border-top: 1px solid var(--line); }
.local-detail-table { min-width: 1500px; table-layout: fixed; }
.local-detail-table th:nth-child(1), .local-detail-table th:nth-child(2) { width: 160px; }
.local-detail-table th:nth-child(3) { width: 130px; }
.local-detail-table th:nth-child(4), .local-detail-table th:nth-child(5) { width: 180px; }
.local-detail-table th:nth-child(6) { width: 110px; }
.local-detail-table th:nth-child(n+7):nth-child(-n+9) { width: 140px; }
.local-detail-table th:nth-child(10) { width: 250px; }
.local-detail-table td { padding-block: 12px; white-space: normal; overflow-wrap: anywhere; }
.local-waybill-lookup { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.local-waybill-lookup > svg { width: 15px; height: 15px; color: var(--accent); }
.local-waybill-lookup input { width: 220px; min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font: inherit; }
.local-lookup-row { background: #fff8df !important; box-shadow: inset 3px 0 0 #c68a24; }
@media (max-width: 760px) { .local-waybill-lookup { width: 100%; margin-left: 0; } .local-waybill-lookup input { flex: 1; width: auto; } }
.local-shipping-view .empty-cell { padding: 28px 12px; color: var(--muted); text-align: center; }
@media (max-width: 1200px) { .local-shipping-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (max-width: 600px) {
  .local-shipping-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-shipping-kpis .sales-kpi { padding: 12px 8px; }
  .local-shipping-kpis .sales-kpi:nth-child(2) { border-right: 0; }
  .local-shipping-kpis .sales-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .local-shipping-toolbar .sales-date-current { margin-left: 0; white-space: normal; }
  .shipment-table:not(.shipped-table) { min-width: 0; }
}
.shipment-table td { overflow-wrap: anywhere; line-height: 1.55; }
.shipped-table th:nth-child(1) { width: 170px; }
.shipped-table th:nth-child(2), .shipped-table th:nth-child(3) { width: 165px; }
.shipped-table th:nth-child(4) { width: 100px; }
.shipped-table th:nth-child(5), .shipped-table th:nth-child(6) { width: 150px; }
.shipped-table th:nth-child(7) { width: 180px; }
.shipped-table th:nth-child(8), .shipped-table th:nth-child(9) { width: 160px; }
.shipped-table th:nth-child(10) { width: 110px; }
.shipped-table th:nth-child(11) { width: 250px; }
.shipped-table th:nth-child(12) { width: 130px; }
.shipment-table .shipment-address { white-space: normal; }
.shipment-table .shipment-product-items { white-space: normal; }
.shipment-product-items .order-main + .order-main { margin-top: 7px; }
.shipment-mail { display: block; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; }
.shipment-summary { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.shipment-summary strong { color: var(--ink); font-size: 17px; }
.product-summary { margin: 12px 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.product-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.product-summary-head h3 { margin: 0; font-size: 13px; }
.product-summary-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.product-summary-count { color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.product-summary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 12px; }
.product-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border: 1px solid #edf0f1; border-radius: 6px; background: #fbfcfc; color: var(--ink); text-align: left; cursor: pointer; }
.product-summary-row:hover, .product-summary-row.active { border-color: #e7ad9f; background: #fff8f5; }
.product-summary-name { display: flex; align-items: flex-start; gap: 7px; min-width: 0; color: var(--ink); font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.product-summary-name > span { display: block; min-width: 0; }
.product-summary-name > span strong { display: block; }
.product-color-swatch { width: 10px; height: 10px; flex: 0 0 10px; margin-top: 2px; border-radius: 50%; border: 1px solid rgba(31,45,51,.16); }
.product-color-swatch.color-米色 { background: #e7d9bc; }
.product-color-swatch.color-粉色 { background: #f3a6ba; }
.product-color-swatch.color-黄色 { background: #f1c84b; }
.product-color-swatch.color-紫色 { background: #9a77c9; }
.product-summary-name small { display: block; margin-top: 3px; color: #b36b3e; font-size: 9px; font-weight: 400; }
.product-summary-row strong { color: var(--accent); font-size: 14px; white-space: nowrap; }
.product-summary-row .product-color-text.color-米色 { color: #786446; }
.product-summary-row .product-color-text.color-粉色 { color: #a5365b; }
.product-summary-row .product-color-text.color-黄色 { color: #806400; }
.product-summary-row .product-color-text.color-紫色 { color: #6f499a; }
.product-summary-row > small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.shipment-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; line-height: 1.6; color: var(--muted); font-size: 11px; }
.shipment-edit-panel { margin-top: 14px; padding: 15px; border: 1px solid #e4c8a2; border-radius: 6px; background: #fffaf3; }
.shipment-edit-panel h4 { margin: 0 0 6px; color: #7c5531; font-size: 12px; }
.shipment-edit-help { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.shipment-note svg, .carrier-hint svg { width: 15px; height: 15px; flex: 0 0 15px; }
.shipment-modal { width: min(640px, 100%); max-height: 85vh; overflow-y: auto; }
.shipment-modal .rule-line { align-items: flex-start; gap: 16px; }
.shipment-modal .rule-line strong { text-align: right; overflow-wrap: anywhere; }
.carrier-hint { display: flex; align-items: center; gap: 8px; margin: 16px 0; color: var(--green); font-size: 11px; }
.carrier-hint.warn { color: var(--amber); }
.shipment-print-state { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.zto-readiness { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 16px; color: var(--muted); font-size: 11px; }
#zto-form fieldset { border: 0; min-width: 0; padding: 0; margin: 0; }
#zto-form fieldset:disabled { opacity: .6; }
.batch-orders { display: grid; gap: 8px; margin-top: 14px; }
.batch-order { display: flex; gap: 9px; padding: 12px 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.batch-order small { display: block; line-height: 1.65; margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.shipment-region-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.shipment-modal .modal-actions { flex-wrap: wrap; }
.shipment-modal .callout { margin: 12px 0; }
.shipment-order-info { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.shipment-order-info summary { cursor: pointer; padding: 11px 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.shipment-order-info[open] summary { margin-bottom: 4px; color: var(--text); }
.shipment-order-info .shipment-region-fields { margin-bottom: 8px; }
.shipment-waybill-details { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.shipment-waybill-details summary { cursor: pointer; padding: 11px 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.shipment-waybill-details[open] summary { margin-bottom: 4px; color: var(--text); }
.shipment-waybill-info { margin-bottom: 12px; }
.shipment-waybill-details .shipment-print-state { margin-bottom: 12px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 2px 2px; color: var(--muted); font-size: 11px; }
.pagination-buttons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagination-button { min-width: 34px; min-height: 30px; padding: 6px 9px; justify-content: center; }
.pagination-ellipsis { padding: 0 2px; color: var(--muted); }
.pagination-current { white-space: nowrap; }
.shipped-filter-toolbar { margin-top: -6px; }
.shipped-history-status { margin: 0 0 12px; }
.shipped-reconciliation { margin: 14px 0 18px; border: 1px solid var(--line); background: var(--panel); }
.shipped-reconciliation .panel-head { min-height: 58px; }
.reconciliation-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.reconciliation-kpis > div { min-height: 74px; padding: 13px 16px; border-right: 1px solid var(--line); }
.reconciliation-kpis > div:last-child { border-right: 0; }
.reconciliation-kpis small, .reconciliation-kpis em { display: inline-block; color: var(--muted); font-size: 10px; font-style: normal; }
.reconciliation-kpis strong { display: inline-block; margin-top: 7px; color: var(--ink); font-size: 21px; line-height: 1; }
.reconciliation-kpis em { margin-left: 4px; }
.reconciliation-table { min-width: 620px; }
.reconciliation-table td { height: 48px; padding-block: 9px; white-space: normal; }
.reconciliation-table .product-color-swatch { display: inline-block; margin-right: 6px; }
.shipped-reconciliation > .callout { margin: 12px; }
.shipped-reconciliation-loading { margin: 0 0 12px; }
@media (max-width: 650px) {
  .reconciliation-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reconciliation-kpis > div:nth-child(2) { border-right: 0; }
  .reconciliation-kpis > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.device-scan { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.device-scan-head, .device-line-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.device-scan-head h4 { margin: 0; }
.device-help { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 8px 0 12px; }
.device-lines { display: grid; gap: 10px; }
.device-line { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.device-line-head small { color: var(--muted); font-weight: 400; }
.device-exempt { display: flex; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.device-reason { width: 100%; margin-top: 7px; }
.device-record { display: flex; justify-content: space-between; gap: 8px; padding-top: 7px; margin-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.device-entry { margin-top: 14px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.device-entry > label, .device-entry > select { display: block; width: 100%; }
.device-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.device-entry .btn, .device-scan > .btn { margin-top: 10px; }
.sim-scan { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sim-scan .device-scan-head h4 { margin: 0; }
.sim-scan .sim-revealed { margin-top: 10px; }
@media (max-width: 560px) { .device-inputs { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 560px) { .shipment-region-fields { grid-template-columns: 1fr; gap: 0; } .shipment-modal .modal-actions .btn { flex: 1 1 140px; justify-content: center; } }
@media (max-width: 760px) {
  .shipment-table-wrap { overflow-x: visible; }
  .shipment-table { display: block; min-width: 0; width: 100%; }
  .shipment-table thead { display: none; }
  .shipment-table tbody { display: grid; gap: 12px; padding: 12px; }
  .shipment-table tbody tr { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
  .shipment-table td { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 8px; height: auto; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .shipment-table td:last-child { border-bottom: 0; }
  .shipment-table td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 11px; }
  .shipment-table .shipment-mail { grid-column: 2; }
  .shipment-table .order-main + .order-main { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
}
.login-agent-mode .nav, .login-agent-mode [data-action="pause"], .login-agent-mode [data-action="scan"] { display: none; }
[hidden] { display: none !important; }

/* After-sales association is intentionally visible in the shipped queue. */
.after-sale-row { background: #fff1f0; color: #8f1d1d; }
.after-sale-row td { border-bottom-color: #f2b8b5; }
.after-sale-flag { display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 4px; color: #a32620; background: #ffe0dd; font-size: 10px; font-weight: 700; }
.badge.red { color: #a32620; background: #ffe0dd; }
.after-sales-sync-status { margin: 0 0 12px; color: #9f2924; }
.after-sales-table { min-width: 900px; }
.after-sales-table .text-action { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.after-sales-kpis { margin-top: 14px; }
.after-sales-sync-time { font-size: 13px !important; }
.commission-order-note { margin: 8px 0; color: var(--muted); font-size: 11px; }
.commission-order-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; }
.commission-order-kpis .sales-kpi { box-shadow: none; }
.commission-clawback-kpi > span { color: #a32620; background: #ffe0dd; }
.commission-clawback-kpi strong { color: #a32620; }
.commission-clawback-table { min-width: 1280px; }
.commission-clawback-table td { white-space: nowrap; }
.commission-clawback-table .commission-address { min-width: 220px; max-width: 380px; white-space: normal; overflow-wrap: anywhere; }
.commission-clawback-link { padding: 0; border: 0; color: #a32620; background: transparent; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.commission-clawback-link:hover, .commission-clawback-link:focus-visible { color: #7f1d1d; }
.commission-clawback-panel { margin: 0 0 16px; scroll-margin-top: 12px; }
.commission-daily-panel { margin-bottom: 16px; }
.commission-daily-panel .table-wrap { max-height: 360px; overflow: auto; }
.commission-daily-table { min-width: 860px; }
.commission-daily-table thead { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.commission-daily-warning { display: block; margin-top: 3px; color: #a32620; font-size: 10px; }
@media (max-width: 760px) {
  .after-sales-table { display: block; min-width: 0; width: 100%; }
  .after-sales-table thead { display: none; }
  .after-sales-table tbody { display: grid; gap: 12px; padding: 12px; }
  .after-sales-table tbody tr { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
  .after-sales-table td { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; height: auto; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .after-sales-table td:last-child { border-bottom: 0; }
  .after-sales-table td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 11px; }
}

/* Sales distribution map */
.sales-map-toolbar { margin-bottom: 12px; }
.sales-map-note { color: var(--muted); font-size: 10px; }
.sales-date-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.sales-date-heading { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 11px; white-space: nowrap; }
.sales-date-heading svg { width: 15px; height: 15px; color: var(--accent); }
.sales-date-presets { flex: 0 0 auto; }
.sales-date-presets .tab { min-height: 28px; padding: 5px 10px; }
.sales-date-inputs { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.sales-date-inputs label { display: inline-flex; align-items: center; gap: 4px; }
.sales-date-inputs input { width: 132px; min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font: inherit; }
.sales-date-inputs .icon-btn { width: 29px; height: 29px; }
.sales-date-current { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.sales-date-current.invalid { color: var(--danger, #b44d36); font-weight: 650; }
.sales-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sales-kpi { display: flex; align-items: center; gap: 11px; min-height: 76px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.sales-kpi > span { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 7px; color: var(--accent); background: var(--accent-soft); }
.sales-kpi > span svg { width: 16px; height: 16px; }
.sales-kpi small, .sales-kpi em { display: block; color: var(--muted); font-size: 10px; font-style: normal; }
.sales-kpi strong { display: inline-block; margin-top: 5px; color: var(--ink); font-size: 20px; line-height: 1; }
.sales-kpi em { display: inline-block; margin-left: 5px; }
.sales-kpi-action { width: 100%; border: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; transition: border-color .16s, box-shadow .16s, transform .16s; }
.sales-kpi-action:hover, .sales-kpi-action:focus-visible { border-color: var(--accent); box-shadow: 0 8px 20px rgba(20,30,38,.1); transform: translateY(-1px); outline: none; }
.sales-map-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 18px; align-items: stretch; }
.sales-map-panel, .sales-ranking-panel, .sales-detail-panel { overflow: hidden; }
.sales-map-panel .panel-head, .sales-ranking-panel .panel-head, .sales-detail-panel .panel-head { min-height: 62px; }
.sales-map-panel .panel-head h3, .sales-ranking-panel .panel-head h3, .sales-detail-panel .panel-head h3 { margin: 0; }
.sales-map-panel .panel-head small, .sales-ranking-panel .panel-head small, .sales-detail-panel .panel-head small { display: block; max-width: 430px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.sales-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.sales-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sales-map-canvas { position: relative; min-height: 560px; padding: 12px 18px 26px; background: linear-gradient(145deg, #f9fbfb 0%, #f2f7f6 100%); }
.sales-map-svg { display: block; width: 100%; height: auto; max-height: 610px; }
.sales-landmass { fill: #e3eeea; stroke: #c3d8d2; stroke-width: 2; stroke-linejoin: round; }
.sales-river { fill: none; stroke: #d2e4ec; stroke-width: 2; opacity: .8; stroke-linecap: round; }
.sales-marker { cursor: pointer; outline: none; }
.sales-marker-halo { fill: transparent; stroke: transparent; stroke-width: 1; transition: .16s; }
.sales-marker-dot { fill: #b9cbc7; stroke: #fff; stroke-width: 2; transition: .16s; }
.sales-marker.active .sales-marker-dot { fill: var(--accent); }
.sales-marker.active:hover .sales-marker-dot, .sales-marker.active:focus .sales-marker-dot, .sales-marker.selected .sales-marker-dot { fill: #bd573f; stroke-width: 3; }
.sales-marker.selected .sales-marker-halo, .sales-marker:focus .sales-marker-halo { fill: rgba(239,104,69,.11); stroke: rgba(239,104,69,.27); }
.sales-marker.empty { opacity: .34; cursor: default; }
.sales-marker text { fill: #62757d; font-size: 10px; pointer-events: none; }
.sales-marker.active text { fill: #40535b; font-weight: 650; }
.sales-map-caption { position: absolute; left: 18px; bottom: 11px; color: #81939a; font-size: 9px; }
.sales-ranking { padding: 8px 14px 14px; }
.sales-rank-row { position: relative; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 8px; width: 100%; min-height: 55px; padding: 10px 4px; border: 0; border-bottom: 1px solid #eef1f3; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.sales-rank-row:last-child { border-bottom: 0; }
.sales-rank-row:hover, .sales-rank-row.active { background: #fff8f5; }
.sales-rank-index { color: #9baab0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; padding-top: 2px; }
.sales-rank-row:nth-child(-n+3) .sales-rank-index { color: var(--accent); font-weight: 700; }
.sales-rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 650; }
.sales-rank-name small, .sales-rank-value small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.sales-rank-value { text-align: right; color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sales-rank-bar { position: absolute; right: 5px; bottom: 2px; left: 36px; height: 2px; background: #f0e3df; }
.sales-rank-bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); opacity: .72; }
.sales-detail-panel { margin-top: 18px; }
.sales-detail-panel .panel-head { justify-content: space-between; }
.sales-city-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; padding: 4px 17px 14px; }
.sales-city-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid #eef1f3; font-size: 11px; }
.sales-city-row span { color: var(--muted); }
.sales-city-row strong { font-size: 11px; }
.sales-city-empty { grid-column: 1 / -1; padding: 22px 0; color: var(--muted); font-size: 11px; }
.sales-return-modal { width: min(1120px, 100%); max-height: 86vh; overflow: hidden; }
.sales-return-modal .modal-body { overflow: auto; }
.sales-return-range { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.sales-return-count { margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.sales-return-table { min-width: 900px; }
@media (max-width: 760px) {
  .sales-return-modal { max-height: 90vh; }
  .sales-return-table { display: block; min-width: 0; width: 100%; }
  .sales-return-table thead { display: none; }
  .sales-return-table tbody { display: grid; gap: 10px; }
  .sales-return-table tbody tr { display: block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; }
  .sales-return-table td { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid #eef1f3; overflow-wrap: anywhere; }
  .sales-return-table td:last-child { border-bottom: 0; }
  .sales-return-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; }
}
@media (max-width: 1180px) {
  .sales-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-map-layout { grid-template-columns: 1fr; }
  .sales-map-canvas { min-height: 480px; }
}
@media (max-width: 560px) {
  .sales-date-filter { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sales-date-presets { width: 100%; overflow-x: auto; }
  .sales-date-presets .tab { flex: 0 0 auto; }
  .sales-date-inputs { width: 100%; flex-wrap: wrap; }
  .sales-date-inputs input { width: 128px; }
  .sales-date-current { margin-left: 0; }
  .sales-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sales-kpi { min-height: 68px; padding: 10px; gap: 7px; }
  .sales-kpi > span { width: 26px; height: 26px; flex-basis: 26px; }
  .sales-kpi strong { font-size: 16px; }
  .sales-kpi em { display: none; }
  .sales-legend { display: none; }
  .sales-map-canvas { min-height: 340px; padding: 7px; }
  .sales-map-caption { left: 9px; }
  .sales-city-grid { grid-template-columns: 1fr 1fr; gap: 0 14px; }
}
.commission-config { grid-template-columns: minmax(330px, .8fr) minmax(0, 1.2fr); gap: 14px; margin: 4px 0 18px; align-items: start; }
.commission-config .form-panel { padding: 17px; }
.commission-config .form-panel .sub { margin-bottom: 15px; }
.commission-config .form-row { gap: 10px; }
.commission-rule-table { min-width: 700px; }
.commission-toolbar { margin-top: 4px; }
.commission-date { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.commission-date input { width: 132px; height: 34px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; }
.commission-entry-table { min-width: 1500px; }
.commission-entry-table .commission-address { min-width: 180px; max-width: 300px; white-space: normal; overflow-wrap: anywhere; padding-top: 8px; padding-bottom: 8px; }
.commission-batch-no { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.commission-payee-source { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.commission-entry-table .commission-highlight { color: #b42318; font-weight: 700; }
.commission-refund-flag { display: block; margin-top: 3px; color: #b42318; font-size: 10px; }
.commissions-view .commission-batches { margin-top: 15px; }
.commission-paid-toggle-wrap { border-top: 1px solid var(--line); }
.commission-paid-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; background: transparent; color: var(--muted); text-align: left; font: inherit; cursor: pointer; }
.commission-paid-toggle:hover { color: var(--ink); background: #fafbfb; }
.commission-paid-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.commission-paid-batches[hidden] { display: none; }
.commissions-view .row-action:disabled { color: #aab4b9; cursor: not-allowed; }
@media (max-width: 1180px) { .commission-config { grid-template-columns: 1fr; } }
@media (max-width: 1180px) { .commission-order-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .commission-order-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commission-toolbar { align-items: stretch; }
  .commission-toolbar .tabs { width: 100%; overflow-x: auto; }
  .commission-toolbar .tab { flex: 0 0 auto; }
  .commission-toolbar .search { flex-basis: 100%; }
  .commission-date { flex: 1 1 calc(50% - 6px); }
  .commission-date input { width: 100%; min-width: 0; }
}
.shared-device-row > td { background-color: #fff0f0 !important; }
.shared-device-flag { display: block; color: #b42318; font-size: 12px; font-weight: 700; white-space: nowrap; }
