:root{color-scheme:light;--ink:#172441;--muted:#53637c;--line:#e0e7f1;--accent:#254fc9;--soft:#edf3ff;--paper:#fff;--bg:#f4f7fc;font-family:"Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;color:var(--ink);background:var(--bg);font-size:14px}
*{box-sizing:border-box}body{margin:0}a{color:var(--accent);text-decoration:none}button,input,select{font:inherit}button,a,label[role=button]{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,label[role=button]:focus-visible,summary:focus-visible{outline:3px solid #739bff;outline-offset:3px}[hidden]{display:none!important}
.top{height:68px;background:#fff;border-bottom:1px solid var(--line)}.top-inner{max-width:1240px;padding:0 28px;margin:auto;height:100%;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;align-items:center;gap:11px;color:var(--ink);font-size:17px;font-weight:750}.logo{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#254fc9;color:white;font-size:23px}.local{background:#edf8f3;color:#18674f;border-radius:30px;padding:7px 12px;font-size:12px;font-weight:700}.local i{display:inline-block;width:7px;height:7px;background:#19865c;border-radius:50%;margin-right:4px}
main{max-width:1240px;margin:auto;padding:32px 28px 24px}.intro{position:relative;overflow:hidden;background:linear-gradient(112deg,#12234f 10%,#223e83 78%,#244998);color:#fff;padding:35px 38px 33px;border-radius:22px;margin-bottom:24px}.intro::after{content:"";position:absolute;right:-60px;top:-230px;width:460px;height:460px;border:1px solid #ffffff2b;border-radius:50%;box-shadow:0 0 0 42px #ffffff0d,0 0 0 86px #ffffff0a;pointer-events:none}.eyebrow{font-size:12px;color:#c7d8ff;letter-spacing:.13em;font-weight:700}h1{font-size:clamp(28px,4vw,44px);letter-spacing:-.04em;margin:10px 0 6px}p{margin:0;line-height:1.65}.intro p{color:#e1eaff;font-size:15px}.platforms{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.platforms span{border:1px solid #ffffff45;border-radius:22px;padding:5px 12px;background:#ffffff14;font-size:12px}.platforms b{margin-left:6px}
.workspace{display:grid;grid-template-columns:1.25fr 1fr;gap:22px;align-items:start}.card{background:white;border:1px solid var(--line);border-radius:18px;padding:24px;box-shadow:0 5px 18px #182f5910;min-width:0}.card-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:18px}.step{display:grid;place-items:center;flex:0 0 33px;height:33px;border-radius:10px;background:var(--soft);color:var(--accent);font-size:12px;font-weight:800}.card h2{margin:0 0 3px;font-size:20px}.card-head p,.muted{color:var(--muted);font-size:13px}
.drop{border:1.5px dashed #a2b7e4;background:#f8faff;border-radius:14px;min-height:202px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:16px;text-align:center}.drop.active{background:#e4edff;border-color:var(--accent)}.upload-icon{width:38px;height:38px;border-radius:11px;background:#e6eeff;color:var(--accent);font-size:25px;font-weight:650;line-height:36px}.drop strong{font-size:15px}
.button{display:inline-flex;gap:9px;align-items:center;justify-content:center;min-height:39px;border-radius:9px;padding:8px 14px;font-weight:700;white-space:nowrap;cursor:pointer}.secondary{background:white;color:var(--ink);border:1px solid #cfdaec}.secondary:hover:not(:disabled){background:#f3f7ff}.primary{background:var(--accent);border:1px solid var(--accent);color:white}.primary:hover:not(:disabled){background:#1e43b1}.options .primary{width:100%;justify-content:space-between}.link{border:0;background:none;padding:0;color:var(--accent);font:inherit;font-weight:700;cursor:pointer}.link:hover,a:hover{text-decoration:underline}.file-info,.file-list li{display:flex;justify-content:space-between;gap:10px;align-items:center}.file-info{margin-top:14px}.file-list{padding:0;margin:8px 0;list-style:none;max-height:140px;overflow:auto}.file-list li{border-top:1px solid var(--line);padding:7px 2px;font-size:12px;overflow-wrap:anywhere}.file-list button{flex:none}.store-list{margin-top:14px;color:var(--muted);font-size:12px}.store-list summary{cursor:pointer;font-weight:700}.store-list p{margin:8px 0}.shops{display:flex;flex-wrap:wrap;gap:5px}.shops span{background:var(--bg);padding:4px 6px;border-radius:5px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.fields label,.report-picker{font-weight:700;display:grid;gap:7px}input:not([type=file]),select{width:100%;min-height:40px;border:1px solid #ccd8eb;border-radius:8px;padding:7px 9px;color:var(--ink);background:white}input:focus,select:focus{outline:2px solid #749aff;outline-offset:1px}.period{background:#f3f6fc;border-radius:9px;padding:9px 11px;margin:12px 0;color:#425373;white-space:pre-line;font-size:13px;line-height:1.6;min-height:39px}.codebook{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding:13px 0;margin-top:12px}.codebook small{display:block;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.code-actions{display:flex;flex-wrap:wrap;gap:9px;font-size:12px;flex-shrink:0}.message{color:var(--muted);font-size:12px}.message:not(:empty){margin-top:9px}.message.error{color:#a12330}
.results{margin-top:24px}.result-head,.toolbar,.pager{display:flex;align-items:center;justify-content:space-between;gap:12px}.result-head .card-head{margin-bottom:0}.report-picker{margin-top:14px;width:min(100%,450px)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.metric{background:#f3f6fc;border:1px solid var(--line);padding:13px;border-radius:10px}.metric b{display:block;font-size:24px;margin-top:2px}.metric span{font-size:12px;color:var(--muted)}.toolbar{margin-bottom:10px;flex-wrap:wrap}.tabs{display:flex;gap:4px}.tabs button{border:0;border-radius:7px;background:transparent;padding:8px 11px;color:var(--muted);font-weight:700}.tabs [aria-pressed=true]{color:var(--accent);background:var(--soft)}#search{width:min(100%,260px)}.table-scroll{overflow:auto;border:1px solid var(--line);border-radius:10px}table{width:100%;border-collapse:collapse;min-width:700px;font-size:12px}th,td{text-align:left;padding:10px;white-space:nowrap;border-bottom:1px solid var(--line)}th{color:#3a4e72;background:#f3f6fc}tbody tr:nth-child(even){background:#fafcff}tr:last-child td{border-bottom:0}.pager{margin-top:12px;color:var(--muted);font-size:12px}.pager div{display:flex;gap:7px}footer{padding:20px 2px;display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:800px){.workspace{grid-template-columns:1fr}.intro{padding:24px}.card{padding:18px}.top-inner,main{padding-left:16px;padding-right:16px}.result-head{align-items:flex-start}.pager{flex-wrap:wrap}}
@media(max-width:390px){.fields{grid-template-columns:1fr}.result-head{flex-wrap:wrap}.tabs button{padding:7px}.metric{padding:8px}.metric b{font-size:20px}}

html { scroll-padding-top: 76px; }
.top { position: sticky; top: 0; z-index: 5; }

.work-nav {
  display: flex;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
}
.work-nav a { padding: 8px 10px; border-radius: 7px; }
.work-nav a[aria-current="page"] { background: var(--soft); }
.code-workspace { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.65fr); }
.code-fields { display: grid; gap: 14px; }
.code-fields label { display: grid; gap: 7px; font-weight: 700; }
.code-workspace table { min-width: 320px; }
.code-workspace td:first-child { white-space: normal; }
#code-search { max-width: 360px; }
#code-preview { overflow-wrap: anywhere; }
.verified-pdd { display: flex; align-items: center; gap: 7px; color: var(--muted); margin: 12px 0; }
.verified-pdd input[type="checkbox"] { width: auto; min-height: 0; }
@media (max-width: 800px) { .code-workspace { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .work-nav a { padding: 6px; } }

.auto-entry { margin-top: 14px; }
.auto-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.auto-presets .button { min-height: 32px; padding: 4px 9px; }
.auto-presets [aria-pressed="true"] { background: var(--soft); color: var(--accent); border-color: var(--accent); }
.range-trigger { width: 100%; justify-content: flex-start; }
.range-calendar { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 8px; }
.range-heading, .range-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.range-heading .button { min-height: 30px; padding: 2px 10px; font-size: 18px; }
.range-heading p { text-align: center; color: var(--muted); font-size: 12px; }
.range-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.range-months h3 { text-align: center; font-size: 13px; margin: 10px 0 6px; }
.range-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.range-grid span, .range-grid button { display: grid; place-items: center; min-height: 28px; font-size: 12px; }
.range-grid span { color: var(--muted); }
.range-grid button { background: white; border: 0; color: var(--ink); padding: 0; }
.range-grid button:hover, .range-grid button.range-between { background: var(--soft); }
.range-grid button.range-endpoint { background: var(--accent); color: white; border-radius: 5px; }
.range-footer { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.range-footer .link { margin-right: auto; }
.range-footer .button { min-height: 31px; padding: 4px 10px; }
@media (max-width: 440px) { .range-months { grid-template-columns: 1fr; } }
.auto-shops { border: 0; margin: 16px 0; padding: 0; }
.auto-shops legend { margin-bottom: 6px; font-weight: 700; }
.shop-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.shop-shortcuts .button { min-height: 32px; padding: 4px 10px; }
.shop-operator-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.shop-operator-filter select { width: min(220px, 100%); min-height: 32px; }
.shop-platform-name { font-weight: 600; }
.shop-platform-name[data-shop-platform="抖店"] { color: #254b95; }
.shop-platform-name[data-shop-platform="天猫"] { color: #962852; }
.shop-platform-name[data-shop-platform="京东"] { color: #ae382d; }
.shop-platform-name[data-shop-platform="拼多多"] { color: #7e4d14; }
[data-theme="dark"] .shop-platform-name[data-shop-platform="抖店"] { color: #9fbcff; }
[data-theme="dark"] .shop-platform-name[data-shop-platform="天猫"] { color: #eea8d0; }
[data-theme="dark"] .shop-platform-name[data-shop-platform="京东"] { color: #ffac99; }
[data-theme="dark"] .shop-platform-name[data-shop-platform="拼多多"] { color: #f1ca80; }
.shop-shortcuts [aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
#shop-options { max-height: 245px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
#shop-options label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
#shop-options input[type="checkbox"] { width: auto; min-height: 0; }
.auto-status { list-style: none; padding: 0; margin: 0 0 14px; }
.auto-status li { display: grid; gap: 3px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.auto-status span { color: var(--muted); }
.auto-status li[aria-current="step"] { background: var(--soft); border-left: 3px solid var(--accent); padding-inline: 9px; }
#batch-overview { margin: -6px 0 12px; }
#batch-counts { font-size: 12px; color: var(--muted); }
#batch-meter { display: block; width: 100%; height: 7px; margin: 6px 0 8px; accent-color: var(--accent); }
#batch-current { color: var(--accent); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.pdd-upload-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.pdd-upload-actions .button { min-height: 32px; padding: 5px 10px; }
.pdd-page main { padding-top: 18px; }
.pdd-page .intro { background: none; color: var(--ink); padding: 0 0 0 14px; border-left: 4px solid var(--accent); border-radius: 0; margin-bottom: 14px; }
.pdd-page .intro::after { display: none; }
.pdd-page .intro h1 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 2px; }
.pdd-page .intro p { font-size: 13px; color: var(--muted); }
.pdd-page .workspace { display: block; }
.pdd-page #start { padding: 16px 20px; }
.pdd-page #start > .card-head { display: none; }
.pdd-page .auto-presets { margin: 6px 0 8px; }
.pdd-batch-toolbar, .pdd-batch-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pdd-batch-toolbar .period { flex: 1 1 240px; margin: 0; }
.pdd-batch-toolbar .batch-controls { margin: 0; }
.pdd-batch-status { margin-top: 6px; color: var(--muted); font-size: 12px; }
.pdd-batch-status .message { margin: 0; }
.pdd-batch-status .message:empty { display: none; }
.pdd-page .auto-shops { margin: 8px 0 0; min-width: 0; }
.pdd-page .auto-shops legend { float: left; margin: 6px 10px 0 0; }
.pdd-page .shop-shortcuts { margin-bottom: 6px; }
.pdd-page #shop-options { clear: both; max-height: none; }
.shop-order-row { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; min-height: 33px; padding: 3px 10px; }
.shop-order-row + .shop-order-row { border-top: 1px solid var(--line); }
.shop-order-row:nth-child(even) { background: #f8faff; }
.shop-order-row:hover { background: #f0f5ff; }
.shop-order-row.is-active { background: #e4edff; box-shadow: inset 3px 0 var(--accent); }
.shop-order-row[data-drop="before"] { box-shadow: inset 0 2px var(--accent); }
.shop-order-row[data-drop="after"] { box-shadow: inset 0 -2px var(--accent); }
.shop-order-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.shop-drag-handle { flex: none; width: 22px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: grab; }
.shop-drag-handle:hover, .shop-drag-handle:focus-visible { background: #dce8fc; color: var(--accent); }
.shop-drag-handle:active { cursor: grabbing; }
#shop-options .shop-order-row label { padding: 0; min-width: 0; }
.pdd-shop-state { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; min-width: 0; }
.pdd-upload-filename { max-width: min(240px, 45vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.pdd-shop-badge { white-space: nowrap; color: var(--muted); font-size: 12px; }
.pdd-shop-badge[data-state="downloaded"] { color: #18674f; }
.pdd-shop-badge[data-state="failed"] { color: #a12330; }
.pdd-shop-state .pdd-upload-actions { margin: 0; }
.pdd-shop-state .button { min-height: 25px; padding: 3px 9px; font-size: 12px; }
.pdd-shop-state .button:first-child { background: var(--soft); color: var(--accent); }
.pdd-page #auto-summary { margin-top: 10px; padding: 0; border: 0; box-shadow: none; }
.pdd-page #auto-summary h2, .pdd-page #auto-summary p { display: none; }
@media (max-width: 560px) {
  .pdd-page #start { padding: 14px; }
  .shop-order-row { flex-wrap: wrap; padding: 6px 8px; }
  .pdd-shop-state { margin-left: auto; }
}
.auto-progress-scroll { max-height: 360px; overflow: auto; overscroll-behavior: contain; padding-right: 8px; }
.retry-panel { background: var(--soft); border-radius: 9px; padding: 10px 12px; margin: 8px 0; }
.retry-panel p { font-size: 12px; color: var(--muted); }
#retry-options { display: flex; flex-wrap: wrap; gap: 6px; max-height: 110px; overflow: auto; }
.retry-entry { width: 100%; overflow-wrap: anywhere; }
.retry-entry p { margin: 3px 0 5px; }
#auto-attention { background: var(--soft); color: var(--ink); padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 7px; overflow-wrap: anywhere; }
#auto-current-step { font-weight: 700; }
#auto-wait-reason { margin-top: 4px; color: var(--muted); }
.retry-shop { min-height: 32px; margin-top: 5px; white-space: normal; text-align: left; }
.auto-status details p { overflow-wrap: anywhere; color: var(--muted); }
#resume label { display: grid; gap: 6px; margin-bottom: 9px; }
#auto-downloads a { display: block; margin-top: 9px; overflow-wrap: anywhere; }
.batch-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#resume { background: var(--soft); padding: 12px; border-radius: 9px; margin-bottom: 8px; }
#challenge-shop { font-weight: 700; overflow-wrap: anywhere; }
#challenge-file { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
#challenge-message { margin: 6px 0 12px; color: var(--muted); }
.history-card { margin-top: 22px; }
.summary-page main { padding-top: 22px; }
.summary-page .history-card { margin-top: 0; }
.history-period-nav { display: flex; gap: 12px; border-bottom: 1px solid var(--line); margin: -6px 0 16px; }
.history-period-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 10px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 700; text-decoration: none; }
.history-period-nav a:hover { color: var(--accent); }
.history-period-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.history-period-nav span:not(:empty) { border-radius: 20px; padding: 1px 6px; background: var(--soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.history-card > .toolbar { align-items: end; justify-content: flex-start; }
.history-picker { display: grid; gap: 7px; flex: 1; min-width: 220px; }
.dash-period-picker { display: grid; gap: 5px; flex: 1 1 135px; min-width: 0; font-size: 12px; font-weight: 700; }
.archive-calendar-trigger { width: 100%; justify-content: space-between; gap: 6px; min-height: 40px; text-align: left; font-weight: 400; }
.archive-calendar-trigger span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.archive-calendar-icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.archive-calendar {
  position: fixed;
  inset: auto;
  z-index: 2;
  width: min(300px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 28px #17244126;
}
.archive-calendar .range-heading { margin-bottom: 8px; }
.archive-calendar .range-heading strong { font-size: 14px; }
.archive-calendar .range-grid button { border-radius: 5px; }
.archive-calendar .range-grid button:disabled { color: #7b8799; }
.archive-calendar .range-grid button:not(:disabled) { background: #edf3ff; color: #23498e; font-weight: 700; }
.archive-calendar .range-grid button:not(:disabled):hover { background: #d6e5ff; }
.archive-calendar .range-grid button[aria-pressed="true"] { background: var(--accent); color: white; }
.archive-calendar .range-grid.archive-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.archive-calendar .archive-month-grid button { min-height: 38px; }
.archive-calendar-help { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.archive-calendar-choices { display: grid; gap: 5px; }
.archive-calendar-choices .button { min-height: 30px; justify-content: flex-start; padding: 4px 8px; font-size: 12px; }
.history-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 20px 0 10px; }
.history-tools label { display: grid; gap: 6px; flex: 1; min-width: 145px; }
.history-actions, .history-channel-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.history-actions { margin-bottom: 10px; }
.history-actions #history-download { margin-left: auto; }
.history-channel-copy .channel-站外 { background: #f1e9fd; border-color: #dfd1f4; }
.history-channel-copy .channel-站内 { background: #e7f5eb; border-color: #cde6d5; }
.history-channel-copy .channel-站外:hover:not(:disabled) { background: #e9ddfa; }
.history-channel-copy .channel-站内:hover:not(:disabled) { background: #d9efdf; }
.history-table { max-height: 580px; margin-top: 10px; }
.history-table th { position: sticky; top: 0; z-index: 1; }
.history-table td { padding: 9px 10px; user-select: text; }
.history-table .channel-站外 { background: #f1e9fd; }
.history-table .channel-站内 { background: #e7f5eb; }
.channel-id-input { width: 100%; max-width: 580px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; font: inherit; }
.summary-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  background: hsl(var(--chip-hue, 214) 65% var(--chip-lightness, 92%));
  color: hsl(var(--chip-hue, 214) 44% 23%);
}
.summary-chip[data-platform="抖店"] { background: #dbe8ff; color: #243f78; }
.summary-chip[data-platform="拼多多"] { background: #ffebbc; color: #674510; }
.summary-chip[data-platform="天猫"] { background: #f9dce4; color: #79283e; }
.summary-chip[data-platform="京东"] { background: #ffddd2; color: #8c3527; }
.refund-cell { background: #fff0f0; font-weight: 700; }
.history-basis { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 18px; }
.operator-management { margin-bottom: 18px; }
.operator-form { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.operator-form label { display: grid; gap: 6px; flex: 1 1 150px; min-width: 0; font-weight: 700; }
.operator-product-picker { display: grid; gap: 6px; flex: 1 1 150px; min-width: 0; font-weight: 700; }
.operator-product-picker details { position: relative; }
.operator-product-picker summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; padding: 7px 7px 7px 13px; border: 1px solid #ccd8eb; border-radius: 8px; background: var(--paper); cursor: pointer; list-style: none; }
.operator-product-picker summary::-webkit-details-marker { display: none; }
.operator-product-picker summary::after { content: ""; flex: none; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.operator-product-picker details[open] > summary { border-color: var(--accent); }
.operator-product-panel { position: absolute; z-index: 3; top: calc(100% + 5px); left: 0; width: min(340px, 100%); padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: 0 8px 24px #17244126; }
@media (max-width: 600px) { .operator-product-picker { flex-basis: 100%; } }
.operator-product-list { margin: 6px 0; max-height: 230px; overflow: auto; }
.operator-form .operator-product-list label { display: flex; align-items: center; padding: 5px 3px; font-weight: 400; cursor: pointer; }
.operator-product-list label:hover { background: var(--soft); }
.operator-product-list input[type="checkbox"] { width: auto; min-height: 0; }
.operator-product-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 7px; }
.operator-product-actions .button { min-height: 30px; padding: 4px 9px; }
.operator-add { margin-top: 12px; color: var(--accent); }
.operator-add summary { cursor: pointer; font-weight: 700; }
.operator-add form { margin-top: 8px; max-width: 360px; color: var(--ink); }
.operator-table { margin-top: 10px; max-height: 280px; }
.shop-workspace .saved-shops .table-scroll { max-height: 280px; }
@media (min-width: 801px) {
  .shop-workspace { align-items: stretch; }
  .shop-workspace .saved-shops { display: flex; flex-direction: column; }
  .shop-workspace .saved-shops .table-scroll { flex: 1; min-height: 0; max-height: none; contain: size; }
}
.operator-table table { min-width: 390px; }
.operator-table th { position: sticky; top: 0; }
.operator-table td { padding: 7px 10px; }

.dash-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 16px 20px; }
.dash-filters label { display: grid; gap: 5px; flex: 1 1 135px; min-width: 0; font-size: 12px; font-weight: 700; }
.dash-filters select { min-width: 0; font-weight: 400; }
@supports (appearance: base-select) {
  .color-select, .color-select::picker(select) { appearance: base-select; }
  .color-select { align-items: center; min-width: 0; }
  .color-select selectedcontent { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .color-select selectedcontent .summary-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  .color-select::picker(select) {
    max-height: min(320px, 60vh);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 8px 24px #0002;
  }
  .color-select option { padding: 5px 10px; }
  .color-select option:is(:hover, :focus-visible, :checked) { background: var(--soft); }
}
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.dash-kpi { padding: 13px 16px; border-top: 3px solid var(--dash-accent); }
.dash-kpi b { display: block; font-size: clamp(18px, 2.5vw, 29px); font-variant-numeric: tabular-nums; letter-spacing: -.035em; overflow-wrap: anywhere; }
.dash-kpi p { color: var(--muted); font-size: 12px; }
.dash-kpi .up { color: #14604a; }
.dash-kpi .down { color: #aa2b48; }
.dash-kpi[data-metric="boxes"] { --dash-accent: #254fc9; }
.dash-kpi[data-metric="gmv"] { --dash-accent: #158194; }
.dash-kpi[data-metric="orders"] { --dash-accent: #7662b6; }
.dash-kpi[data-metric="refund"] { --dash-accent: #be6b34; }
.dash-panels { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 12px; }
.dash-panels .card, .dash-detail { padding: 16px 20px; }
.dash-panel-head, .dash-chart-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dash-panel-head { justify-content: space-between; }
.dash-chart-controls select { width: auto; min-height: 32px; font-size: 12px; }
.dash-chart { overflow-x: auto; margin-top: 8px; }
.dash-chart svg { display: block; width: 100%; min-width: 500px; }
.dash-chart text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.dash-chart .dash-grid { stroke: var(--line); stroke-width: 1; }
.dash-chart .dash-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dash-chart .dash-dot { fill: var(--paper); stroke: var(--accent); stroke-width: 2; cursor: pointer; }
.dash-chart .dash-dot:hover, .dash-chart .dash-dot:focus { fill: var(--accent); }
.dash-products { margin-top: 8px; max-height: 290px; overflow: auto; padding: 2px 6px 2px 2px; }
.dash-breakdown-item + .dash-breakdown-item { margin-top: 9px; }
.dash-product-pick {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 4px 5px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
}
.dash-product-pick:hover, .dash-product-pick[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.dash-product-pick b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-product-bar { display: flex; height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; margin: 4px 5px; }
.dash-product-bar span { flex: 0 0 auto; background: var(--accent); }
.dash-product-bar span:not([data-platform]) { background: hsl(var(--chip-hue) 62% 41%); }
.dash-product-bar [data-platform="天猫"] { background: #cc6486; }
.dash-product-bar [data-platform="京东"] { background: #d67155; }
.dash-product-bar [data-platform="拼多多"] { background: #bc8324; }
.dash-product-platforms { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 5px; }
.dash-product-platforms .summary-chip { font-size: 11px; padding: 1px 6px; }
.dash-detail { margin-top: 12px; }
.dash-detail .table-scroll { margin-top: 8px; max-height: 300px; }
.dash-detail th { position: sticky; top: 0; }
.dash-shop-pick { border: 0; }
.dash-shop-pick:hover { text-decoration: underline; }
@media (max-width: 800px) { .dash-panels { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .top { height: auto; }
  .top-inner { min-height: 68px; flex-wrap: wrap; gap: 6px; padding-block: 8px; }
  .work-nav { flex-wrap: wrap; }
}

.catalog-heading {
  margin-bottom: 20px;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--accent);
}
.catalog-heading h1 { margin: 0 0 4px; font-size: clamp(25px, 4vw, 34px); }
.catalog-heading p { color: var(--muted); }
.catalog-editors { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.catalog-page .card { padding: 20px; }
.catalog-editors .card { display: flex; flex-direction: column; }
.catalog-editors .card-head { margin-bottom: 14px; }
.catalog-channel { border-color: #ded4ee; background: #fdfbff; }
.catalog-editors .code-fields { gap: 10px; }
.catalog-channel .code-fields { gap: 7px; }
.catalog-channel textarea {
  max-width: none;
  min-height: 72px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}
.catalog-channel textarea:disabled { background: #f4f2f7; }
.catalog-channel textarea:focus { outline: 2px solid #749aff; outline-offset: 1px; }
.catalog-help { margin: 9px 0 12px; color: var(--muted); font-size: 12px; }
.catalog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.catalog-actions .message { margin: 0; }
.catalog-actions .message:empty { display: none; }
.catalog-library { margin-top: 16px; }
.catalog-library-head, .catalog-library-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.catalog-library-head { justify-content: space-between; margin-bottom: 12px; }
.catalog-library-tools { flex: 0 1 392px; }
.catalog-library-tools input { flex: 1 1 140px; }
.gift-tag { padding: 3px 8px; border: 1px solid transparent; border-radius: 999px; color: var(--accent); background: transparent; cursor: pointer; }
.gift-tag.summary-chip { --chip-hue: 150; }
.gift-tag:hover { border-color: currentColor; }
.gift-tag:disabled { cursor: wait; }
.catalog-library .table-scroll { max-height: 280px; }
.catalog-library table { min-width: 0; }
.catalog-library th { position: sticky; top: 0; }
.catalog-library th, .catalog-library td { padding: 7px 10px; }
.catalog-library td { white-space: normal; overflow-wrap: anywhere; }
.catalog-library .pager { margin-top: 8px; }
.catalog-library .pager .button { min-height: 32px; padding: 5px 10px; }
.theme-toggle {
  position: relative;
  display: inline-grid;
  flex: none;
  grid-template-columns: repeat(2, 26px);
  align-items: center;
  justify-items: center;
  height: 34px;
  padding: 0 3px;
  margin-left: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  color: var(--muted);
}
.theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #15151526;
}
.theme-toggle svg { position: relative; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle[aria-pressed="false"] svg:first-of-type { color: #94601e; }
.theme-toggle[aria-pressed="true"]::before { left: 29px; background: #414141; }
.theme-toggle[aria-pressed="true"] svg:last-of-type { color: #f1f1f1; }
.top-inner .work-nav { margin-left: auto; }
@media (max-width: 840px) {
  html { scroll-padding-top: 144px; }
  .top { height: auto; }
  .top-inner { min-height: 68px; flex-wrap: wrap; gap: 6px; padding-block: 8px; }
  .top-inner .work-nav { order: 1; width: 100%; flex-wrap: wrap; margin-left: 0; }
  .theme-toggle { margin: 0 auto 0 6px; }
}
@media (max-width: 390px) { html { scroll-padding-top: 170px; } }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181818;
  --paper: #222222;
  --ink: #eeeeee;
  --muted: #bbbbbb;
  --line: #373737;
  --soft: #2d2d2d;
  --accent: #f2bd56;
  --field: #525252;
  --success: #8ad5aa;
  --error: #eca2a8;
  --channel-external: #2a282e;
  --channel-internal: #252d2a;
}
[data-theme="dark"] :is(.top, .card, .secondary, .range-grid button, input:not([type=file]), select) { background: var(--paper); }
[data-theme="dark"] :is(.logo, .step, .upload-icon) { background: #523916; color: var(--accent); }
[data-theme="dark"] .work-nav a { color: var(--muted); }
[data-theme="dark"] .work-nav a:is(:hover, [aria-current="page"]) { background: #3e2e18; color: var(--accent); }
[data-theme="dark"] :is(input:not([type=file]), select, .secondary, .channel-id-input, .operator-product-picker summary) { border-color: var(--field); }
[data-theme="dark"] .card { box-shadow: 0 5px 18px #0003; }
[data-theme="dark"] .intro:not(.pdd-page .intro) { background: linear-gradient(112deg, #202020, #303030); }
[data-theme="dark"] .intro:not(.pdd-page .intro) p { color: var(--muted); }
[data-theme="dark"] :is(th, .period, .metric, .drop) { background: var(--soft); color: var(--ink); }
[data-theme="dark"] :is(tbody tr:nth-child(even), .shop-order-row:nth-child(even), .catalog-channel textarea:disabled) { background: #272727; }
[data-theme="dark"] :is(.secondary:hover:not(:disabled), .shop-order-row:hover, .shop-order-row.is-active, .shop-drag-handle:hover,
  .range-grid button:hover, .range-grid button.range-between, .drop.active) { background: var(--soft); }
[data-theme="dark"] :is(.primary, .range-grid button.range-endpoint, .archive-calendar .range-grid button[aria-pressed="true"]) {
  background: #8e5513;
  border-color: #b77a2d;
  color: #fff4df;
}
[data-theme="dark"] .primary:hover:not(:disabled) { background: #985c16; }
[data-theme="dark"] :is(.auto-presets .button, #range-open) {
  background: #2d2b28;
  border-color: #71675a;
  color: #f2ece2;
}
[data-theme="dark"] :is(.auto-presets .button, #range-open):where(:hover:not(:disabled)) {
  background: #3a3228;
  border-color: #b2864c;
}
[data-theme="dark"] :is(.auto-presets .button[aria-pressed="true"], #range-open[aria-expanded="true"]) {
  background: #644317;
  border-color: #d6a04e;
  color: #ffe2a4;
}
[data-theme="dark"] #auto-period {
  background: #352c21;
  border-left: 3px solid #c98c3b;
  color: #f3dfbb;
}
[data-theme="dark"] .archive-calendar .range-grid button:not(:disabled):not([aria-pressed="true"]) { background: var(--soft); color: var(--accent); }
[data-theme="dark"] .archive-calendar .range-grid button:not(:disabled):hover:not([aria-pressed="true"]) { background: #393939; }
[data-theme="dark"] .catalog-channel { border-color: var(--line); background: var(--paper); }
[data-theme="dark"] :is(.history-table, .history-channel-copy) .channel-站外 { background: var(--channel-external); border-color: #403b47; }
[data-theme="dark"] :is(.history-table, .history-channel-copy) .channel-站内 { background: var(--channel-internal); border-color: #39453f; }
[data-theme="dark"] .history-channel-copy .channel-站外:hover:not(:disabled) { background: #36313c; }
[data-theme="dark"] .history-channel-copy .channel-站内:hover:not(:disabled) { background: #303b35; }
[data-theme="dark"] .refund-cell { background: #30282a; }
[data-theme="dark"] :is(.message.error, .pdd-shop-badge[data-state="failed"], .dash-kpi .down) { color: var(--error); }
[data-theme="dark"] :is(.pdd-shop-badge[data-state="downloaded"], .dash-kpi .up) { color: var(--success); }
[data-theme="dark"] .summary-chip {
  background: hsl(var(--chip-hue, 214) 32% 24%);
  color: hsl(var(--chip-hue, 214) 62% 84%);
}
[data-theme="dark"] .summary-chip[data-platform="抖店"] { --chip-hue: 215; }
[data-theme="dark"] .summary-chip[data-platform="拼多多"] { --chip-hue: 39; }
[data-theme="dark"] .summary-chip[data-platform="天猫"] { --chip-hue: 340; }
[data-theme="dark"] .summary-chip[data-platform="京东"] { --chip-hue: 14; }
[data-theme="dark"] .dash-product-bar span:not([data-platform]) { background: hsl(var(--chip-hue) 53% 62%); }
[data-theme="dark"] .dash-product-bar [data-platform="抖店"] { background: #7ea5e4; }
[data-theme="dark"] .dash-product-bar [data-platform="拼多多"] { background: #d8a454; }
[data-theme="dark"] .dash-product-bar [data-platform="天猫"] { background: #ce819c; }
[data-theme="dark"] .dash-product-bar [data-platform="京东"] { background: #db8b76; }
[data-theme="dark"] :is(.dash-kpi, .dash-chart)[data-metric="gmv"] { --dash-accent: #6acbbb; }
[data-theme="dark"] :is(.dash-kpi, .dash-chart)[data-metric="boxes"] { --dash-accent: #8ab3f1; }
[data-theme="dark"] :is(.dash-kpi, .dash-chart)[data-metric="orders"] { --dash-accent: #bd9de3; }
[data-theme="dark"] :is(.dash-kpi, .dash-chart)[data-metric="refund"] { --dash-accent: var(--accent); }
[data-theme="dark"] .card.dash-kpi {
  background-image: linear-gradient(145deg, color-mix(in srgb, var(--dash-accent) 15%, var(--paper)), var(--paper) 70%);
}
[data-theme="dark"] .dash-kpi b { color: var(--dash-accent); }
[data-theme="dark"] .dash-chart :is(.dash-line, .dash-dot) { stroke: var(--dash-accent); }
[data-theme="dark"] .dash-chart .dash-dot:is(:hover, :focus) { fill: var(--dash-accent); }
@media (max-width: 700px) {
  .catalog-editors { grid-template-columns: 1fr; }
  .catalog-page .top { height: auto; }
  .catalog-page .top-inner { min-height: 68px; gap: 6px; padding-block: 8px; }
}

.cache-trigger{padding:6px 10px;white-space:nowrap}.cache-dialog{max-width:520px;width:calc(100% - 40px);border:1px solid #ccd4e0;border-radius:18px;padding:24px;color:#182541;background:#fff}.cache-dialog::backdrop{background:#0008}.cache-dialog p{line-height:1.65}.cache-dialog label{display:block;margin:14px 0}.cache-dialog input[type=number]{width:90px}.cache-actions{display:flex;gap:8px;flex-wrap:wrap}[data-theme=dark] .cache-dialog{background:#242424;color:#eee;border-color:#484848}

.cache-dialog label{display:flex;align-items:center;gap:10px}.cache-dialog input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;padding:0;flex:none}.cache-dialog input[type=number]{height:36px}
