/* Delivery page — OA-style workspace inside app shell */
.delivery-body {
  margin: 0;
  background: #e8ecf1;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #0f172a;
}

/* 交付页不在侧栏堆叠全部指数 */
.delivery-body .landing-appside-section {
  display: none;
}

.delivery-app-main {
  background: #e8ecf1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.delivery-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #d8dee8;
}

.delivery-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.delivery-page-sub {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
  max-width: 36rem;
  line-height: 1.5;
}

.delivery-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.delivery-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.delivery-tab:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.delivery-tab.is-active,
.delivery-tab[aria-selected="true"] {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.delivery-workspace {
  flex: 1;
  padding: 1rem 1.25rem 2rem;
}

/* OA-style backtest progress (main workspace) */
.delivery-bt-progress {
  margin-bottom: 1rem;
}

.delivery-bt-progress-card {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 1.5rem 1.75rem 1.35rem;
}

.delivery-bt-progress-hd {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.delivery-bt-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e2e8f0;
  border-top-color: #2b8cd5;
  border-radius: 50%;
  flex-shrink: 0;
  animation: delivery-bt-spin 0.85s linear infinite;
}

@keyframes delivery-bt-spin {
  to {
    transform: rotate(360deg);
  }
}

.delivery-bt-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.delivery-bt-progress--done .delivery-bt-icon {
  background: #ecfdf5;
  color: #15803d;
}

.delivery-bt-progress--error .delivery-bt-icon {
  background: #fef2f2;
  color: #b91c1c;
}

.delivery-bt-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
}

.delivery-bt-sub {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.4;
}

.delivery-bt-pbar {
  display: block;
  margin: 1.1rem 0 0;
  height: 6px;
  max-width: 24rem;
  background: #e8ecf1;
  border-radius: 999px;
  overflow: hidden;
}

.delivery-bt-pbar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2b8cd5, #22a06b);
  border-radius: 999px;
  transition: width 0.45s ease;
}

.delivery-bt-hint {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
  max-width: 32rem;
}

.delivery-bt-timings {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.delivery-bt-timings-hd {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.55rem;
}

.delivery-bt-timing-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1.1fr) 1.4fr auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 0.35rem;
}

.delivery-bt-timing-row--top .delivery-bt-timing-name {
  color: #0f172a;
  font-weight: 600;
}

.delivery-bt-timing-name {
  color: #475569;
}

.delivery-bt-timing-live {
  font-style: normal;
  font-size: 0.72rem;
  color: #2b8cd5;
  font-weight: 600;
}

.delivery-bt-timing-bar {
  height: 0.45rem;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.delivery-bt-timing-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7dd3fc, #2b8cd5);
  border-radius: 999px;
  min-width: 4%;
}

.delivery-bt-timing-row--top .delivery-bt-timing-bar > i {
  background: linear-gradient(90deg, #fdba74, #ea580c);
}

.delivery-bt-timing-sec {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #334155;
  white-space: nowrap;
}

.delivery-bt-timing-pct {
  color: #94a3b8;
  font-size: 0.78rem;
}

.delivery-bt-timing-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.delivery-bt-timings--compact .delivery-bt-timing-row {
  font-size: 0.8rem;
}

.delivery-bt-timing-row--live .delivery-bt-timing-bar > i {
  background: linear-gradient(90deg, #fdba74, #ea580c);
  animation: delivery-bt-timing-pulse 1.2s ease-in-out infinite;
}

@keyframes delivery-bt-timing-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.delivery-bt-timings--running .delivery-bt-timing-pct {
  display: none;
}

.delivery-results .delivery-bt-timings {
  margin: 0.75rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
}

.delivery-bt-progress--done .delivery-bt-pbar > i {
  background: #22a06b;
}

.delivery-bt-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.delivery-bt-link:hover {
  text-decoration: underline;
}

.delivery-progress-only {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: min(420px, calc(100vh - 12rem));
  padding: 2rem 1rem 3rem;
}

.delivery-progress-only .delivery-bt-progress {
  width: 100%;
  max-width: 36rem;
  margin-bottom: 0;
}

.delivery-progress-only .delivery-bt-progress-card {
  padding: 2rem 2rem 1.75rem;
}

.delivery-progress-only .delivery-bt-pbar {
  max-width: none;
}

.delivery-loading {
  text-align: center;
  color: #64748b;
  padding: 3rem 1rem;
}

.delivery-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .delivery-split {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.delivery-panel {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.delivery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
}

.delivery-filter-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.delivery-filter-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.delivery-filter-btn.is-on {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.delivery-toolbar fill,
.delivery-toolbar .delivery-toolbar-spacer {
  flex: 1;
}

.delivery-search {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  width: 11rem;
  max-width: 100%;
}

.delivery-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
}

.delivery-stat {
  padding: 0.85rem 1rem;
  border-right: 1px solid #e2e8f0;
}

.delivery-stat:last-child {
  border-right: none;
}

.delivery-stat label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.delivery-stat .val {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.delivery-stat .val.pos {
  color: #15803d;
}

.delivery-grid-wrap {
  overflow-x: auto;
}

.delivery-grid {
  width: 100%;
  min-width: 640px;
}

.delivery-grid-hd,
.delivery-row > .delivery-row-bd {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.delivery-grid-hd {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-weight: 600;
  padding: 0.55rem 0;
}

.delivery-grid-hd .cell,
.delivery-row-bd .cell {
  padding: 0 0.75rem;
  flex-shrink: 0;
}

.delivery-grid-hd .cell.pick,
.delivery-row-bd .cell.pick {
  width: 2.5rem;
  min-width: 2.5rem;
  justify-content: center;
}

.delivery-grid-hd .cell.market,
.delivery-row-bd .cell.market {
  flex: 1.8;
  min-width: 10rem;
}

.delivery-grid-hd .cell.region,
.delivery-row-bd .cell.region {
  flex: 1;
  min-width: 6rem;
  color: #64748b;
}

.delivery-grid-hd .cell.status,
.delivery-row-bd .cell.status {
  width: 6.5rem;
  min-width: 6.5rem;
}

.delivery-grid-hd .cell.num,
.delivery-row-bd .cell.num {
  width: 5.5rem;
  min-width: 5.5rem;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.delivery-row {
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
  transition: background 0.12s;
}

.delivery-row:hover {
  background: #f8fafc;
}

.delivery-row.is-selected {
  background: #eff6ff;
}

.delivery-row.is-disabled {
  cursor: default;
  opacity: 0.72;
}

.delivery-row.is-disabled:hover {
  background: transparent;
}

.delivery-row-bd {
  padding: 0.7rem 0;
}

.delivery-row-bd .sym {
  font-weight: 700;
  color: #2563eb;
  margin-right: 0.5rem;
}

.delivery-row-bd .strat {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.delivery-pick-dot {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: inline-block;
}

.delivery-row.is-selected .delivery-pick-dot {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #fff;
}

.delivery-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.delivery-status.live {
  background: #dcfce7;
  color: #166534;
}

.delivery-status.register {
  background: #fef3c7;
  color: #92400e;
}

.delivery-status.soon {
  background: #f1f5f9;
  color: #64748b;
}

.delivery-side {
  position: sticky;
  top: 1rem;
}

.delivery-side-inner {
  padding: 1.15rem 1.25rem;
}

.delivery-side h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.delivery-side-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.delivery-side-list {
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #334155;
}

.delivery-side-list li {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.delivery-side-list li::before {
  content: "✓";
  color: #16a34a;
  font-weight: 700;
}

.delivery-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.delivery-cta-primary {
  display: block;
  text-align: center;
  padding: 0.65rem 1rem;
  background: #2563eb;
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.delivery-cta-primary:hover {
  background: #1d4ed8;
}

.delivery-cta-secondary {
  display: block;
  text-align: center;
  padding: 0.55rem 1rem;
  border: 1px solid #cbd5e1;
  color: #475569 !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #fff;
}

.delivery-side-hint {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.5;
}

.delivery-side-empty {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
}

.landing-appside-item[data-active="true"] {
  background: rgba(37, 99, 235, 0.35);
  color: #fff;
}

/* Right slide-out backtest panel (OA-style) */
.delivery-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.delivery-drawer-root.is-open {
  pointer-events: auto;
}

.delivery-drawer-root[hidden] {
  display: none;
}

.delivery-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.22s ease;
  cursor: pointer;
}

.delivery-drawer-root.is-open .delivery-drawer-backdrop {
  opacity: 1;
}

.delivery-drawer-card {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(54rem, 100vw);
  max-width: 100%;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.delivery-drawer-root.is-open .delivery-drawer-card {
  transform: translateX(0);
}

.delivery-drawer-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delivery-drawer-close:hover {
  background: #f1f5f9;
  color: #334155;
}

.delivery-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.delivery-drawer-hd {
  padding: 1.35rem 3.5rem 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.delivery-drawer-hd h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

.delivery-drawer-form {
  padding: 0 0 2rem;
}

.delivery-form-group {
  border-bottom: 1px solid #e8edf2;
}

.delivery-form-group-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  user-select: none;
  background: #fafbfc;
}

.delivery-form-group-hd h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.delivery-form-group-hd .caption {
  font-weight: 400;
  color: #94a3b8;
  margin-left: 0.35rem;
  font-size: 0.8rem;
}

.delivery-form-group-hd::after {
  content: "−";
  color: #64748b;
  font-size: 1.1rem;
}

.delivery-form-group.is-collapsed .delivery-form-group-hd::after {
  content: "+";
}

.delivery-form-group-bd {
  padding: 0.25rem 1.5rem 1.25rem;
}

.delivery-form-group.is-collapsed .delivery-form-group-bd {
  display: none;
}

.delivery-field {
  margin-bottom: 1.1rem;
}

.delivery-field:last-child {
  margin-bottom: 0;
}

.delivery-field > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.45rem;
}

.delivery-field .desc {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  line-height: 1.45;
}

.delivery-pickbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.delivery-pickbar .opt {
  border: none;
  background: #fff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  border-right: 1px solid #e2e8f0;
  font-family: inherit;
}

.delivery-pickbar .opt:last-child {
  border-right: none;
}

.delivery-pickbar .opt:hover {
  background: #f8fafc;
}

.delivery-pickbar .opt.is-selected {
  background: #2563eb;
  color: #fff;
}

.delivery-field input[type="text"],
.delivery-field input[type="number"],
.delivery-field textarea,
.delivery-field select {
  width: 100%;
  max-width: 20rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  box-sizing: border-box;
}

.delivery-field textarea {
  max-width: 100%;
  min-height: 5rem;
  resize: vertical;
}

.delivery-field-readonly {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  color: #0f172a;
  padding: 0.5rem 0;
}

.delivery-drawer-ft {
  position: sticky;
  bottom: 0;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.delivery-job-status {
  width: 100%;
  font-size: 0.85rem;
  color: #475569;
  text-align: center;
  line-height: 1.4;
}

.delivery-job-status--running,
.delivery-job-status--queued {
  color: #0f766e;
}

.delivery-job-status--done {
  color: #15803d;
}

.delivery-job-status--error {
  color: #b91c1c;
}

.delivery-job-link {
  color: #2563eb;
  text-decoration: none;
  margin-left: 0.35rem;
}

.delivery-job-link:hover {
  text-decoration: underline;
}

.delivery-run-btn {
  min-width: 14rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 6px;
  background: #22a06b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.delivery-run-btn:hover {
  background: #1d8f5c;
}

.delivery-run-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delivery-readiness-warn {
  margin: 0 1.25rem 1rem;
  padding: 0.75rem 1rem;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #9a3412;
  line-height: 1.45;
}

.delivery-readiness-cmd code {
  font-size: 0.8rem;
  word-break: break-all;
}

.delivery-status.ready {
  color: #15803d;
}

.delivery-status.no_panel {
  color: #94a3b8;
}

.delivery-status.locked {
  color: #9a6b00;
  background: rgba(201, 151, 0, 0.08);
}

.delivery-id-sep {
  color: #94a3b8;
  margin: 0 0.15rem;
}

.delivery-entitlement-warn {
  border-left-color: #c99700;
}

.delivery-field-factors .delivery-factor-hint {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: #64748b;
}

.delivery-factor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.delivery-factor-chip {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.delivery-factor-chip:hover {
  border-color: #94a3b8;
}

.delivery-factor-chip.is-on {
  background: #ecfdf5;
  border-color: #22a06b;
  color: #166534;
  font-weight: 600;
}

.delivery-factor-chip[data-slow="1"]:not(.is-on)::after {
  content: " · 较慢";
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 400;
}

.delivery-cta-primary {
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

/* Layered results (main panel, after backtest) */
.delivery-results {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.15rem 1.25rem;
  background: #fafbfc;
}

.delivery-research-disclaimer {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.5;
}

.delivery-research-disclaimer strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #78350f;
}

.delivery-research-disclaimer p {
  margin: 0 0 0.35rem;
}

.delivery-research-disclaimer-foot {
  font-size: 0.8rem;
  color: #a16207;
}

.delivery-hero-register-hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
  max-width: 36rem;
}

.delivery-results-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.delivery-results-hd h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.delivery-bt-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.delivery-bt-link:hover {
  text-decoration: underline;
}

.delivery-results-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.delivery-results-charts--nav-only {
  display: block;
}

.delivery-nav-chart-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.delivery-nav-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.delivery-nav-bench-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.delivery-nav-bench-toggle input {
  accent-color: #207ad4;
}

.delivery-nav-chart-host {
  min-height: 420px;
  padding: 0.25rem 0.5rem 0.5rem;
}

.delivery-nav-chart-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.delivery-nav-chart-loading {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.delivery-results-no-chart {
  margin: 0;
  padding: 1rem;
  font-size: 0.85rem;
  color: #64748b;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
}

.delivery-results-charts figure {
  margin: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.delivery-results-charts figure.is-missing {
  display: none;
}

.delivery-results-charts img {
  display: block;
  width: 100%;
  height: auto;
}

.delivery-results-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #64748b;
}

.delivery-results-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.delivery-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.delivery-results-table th,
.delivery-results-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.delivery-results-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
}

.delivery-results-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* 年化收益最高的一组（单调性失效时仍易辨认） */
.delivery-results-table tr.is-top-return {
  background: #e0f2fe;
}

.delivery-results-table tr.is-top-return td:first-child {
  font-weight: 700;
  color: #0369a1;
}

.delivery-group-dl {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: #1d4ed8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.delivery-group-dl:hover {
  color: #1e3a8a;
}

/* Run params (right sidebar after backtest) */
.delivery-run-params {
  margin: 0 0 1rem;
}

.delivery-run-params h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.delivery-run-params h4 {
  margin: 1rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.delivery-param-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.delivery-param-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.delivery-param-dl dd {
  margin: 0;
  color: #0f172a;
}

.delivery-param-meta {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
}

.delivery-param-ul {
  margin: 0;
  padding: 0 0 0 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #334155;
}

.delivery-param-id {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: #475569;
}

.delivery-param-factors {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.delivery-param-factors .delivery-param-chip {
  display: inline-block;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  background: #f8fafc;
  color: #334155;
}

/* 工作区：选标的 + 回测记录 */
.delivery-main {
  padding: 0;
}

.delivery-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fafbfc;
}

.delivery-hero--empty {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.delivery-hero--empty p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.delivery-hero-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.delivery-hero h2 {
  margin: 0;
  font-size: 1.2rem;
}

.delivery-hero-meta {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.delivery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.delivery-hero-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.delivery-hero-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.delivery-hero-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.delivery-hero-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.delivery-history--page {
  padding: 0;
  border-top: none;
}

.delivery-history-page {
  max-width: 1180px;
  margin: 0 auto;
}

.delivery-history-page-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.delivery-history {
  padding: 1rem 1.15rem 1.35rem;
  border-top: 1px solid #e2e8f0;
}

.delivery-history h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.delivery-history-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.delivery-history-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}

.delivery-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.delivery-history-table th,
.delivery-history-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.delivery-history-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
}

.delivery-history-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.delivery-history-table tr.is-active {
  background: #eff6ff;
}

.delivery-history-st.done {
  color: #15803d;
}

.delivery-history-st.error {
  color: #b91c1c;
}

.delivery-history-st.running,
.delivery-history-st.queued {
  color: #0f766e;
}

.delivery-history-view {
  border: none;
  background: none;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.delivery-run-uid-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 9.5rem;
}

.delivery-run-uid,
.delivery-run-uid-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #334155;
  word-break: break-all;
}

.delivery-run-uid-link {
  text-decoration: none;
}

.delivery-run-uid-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.delivery-run-uid-copy {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 0.15rem;
  line-height: 1;
}

.delivery-run-uid-copy:hover {
  color: #1d4ed8;
}

.delivery-results-run-uid {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.delivery-history-view:hover {
  background: #eff6ff;
  text-decoration: underline;
}

.delivery-history-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
  padding: 0 0.15rem;
}

.delivery-history-page-info,
.delivery-history-page-num {
  font-size: 0.78rem;
  color: #64748b;
}

.delivery-history-page-num {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.delivery-history-page-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.delivery-history-page-btn:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}

.delivery-history-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 选择标的弹层 */
.delivery-picker-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.delivery-picker-root.is-open {
  pointer-events: auto;
  opacity: 1;
}

.delivery-picker-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.delivery-picker-card {
  position: relative;
  width: min(28rem, 100%);
  max-height: min(80vh, 520px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(8px);
  transition: transform 0.25s ease;
}

.delivery-picker-root.is-open .delivery-picker-card {
  transform: translateY(0);
}

.delivery-picker-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #475569;
}

.delivery-picker-scroll {
  overflow-y: auto;
  padding: 1rem 1rem 1.25rem;
}

.delivery-picker-hd h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  padding-right: 2rem;
}

.delivery-picker-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  font-family: inherit;
}

.delivery-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.delivery-picker-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.delivery-picker-item:hover:not(.is-disabled) {
  border-color: #2563eb;
  background: #f8fafc;
}

.delivery-picker-item.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.delivery-picker-item.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.delivery-picker-badge {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.delivery-picker-label {
  font-size: 0.85rem;
  color: #334155;
}

.delivery-picker-label strong {
  font-weight: 700;
}

@media (max-width: 640px) {
  .delivery-stats {
    grid-template-columns: 1fr;
  }

  .delivery-stat {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .delivery-stat:last-child {
    border-bottom: none;
  }
}
