:root {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --card: #ffffff;
  --text: #202734;
  --muted: #6b7586;
  --accent: #2b7cff;
  --accent-2: #45c3b3;
  --border: #e4e8ee;
  --shadow: 0 6px 18px rgba(20, 40, 70, 0.08);
  --radius: 10px;
  --blur: blur(0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none; }

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 100%;
  margin: 0;
  padding: 20px 24px 30px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin: -10px -20px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(24, 39, 64, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand__icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.brand__name {
  font-size: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.15s;
}

.nav a:hover {
  background: rgba(51, 120, 255, 0.08);
  color: var(--accent);
  transform: translateY(-1px);
}

.nav a.is-active {
  color: var(--accent);
  position: relative;
}

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.btn {
  border: 1px solid var(--border);
  background: #f7f9fc;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  background: #eef3fb;
}

.btn--primary {
  background: var(--accent);
  border: none;
  color: #fff;
  box-shadow: 0 10px 20px rgba(51, 120, 255, 0.25);
}

.btn--ghost {
  background: transparent;
  border-color: #d8deea;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

#trade.card {
  box-shadow: none;
  border: none;
  padding: 0;
  margin-bottom: 0;
}

.content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.trade-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.trade-menu {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(20, 40, 70, 0.06);
  height: fit-content;
}

.trade-menu__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trade-menu__icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.trade-menu__parent {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  font-weight: 700;
  color: #2f3a4e;
  cursor: pointer;
}

.trade-menu__parent:hover {
  background: #f5f7fb;
}

.trade-menu__parent.is-open .caret {
  transform: rotate(90deg);
}

.caret {
  transition: transform 0.15s ease;
}

.trade-sublist {
  padding-left: 6px;
  margin: 4px 0 8px;
}

.trade-menu__block + .trade-menu__block {
  margin-top: 8px;
  border-top: 1px solid #ecf0f6;
  padding-top: 8px;
}

.trade-menu__item {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #4a5465;
  margin-bottom: 6px;
  transition: background 0.2s, color 0.2s;
}

.trade-menu__item:hover {
  background: #f1f4fa;
  color: var(--accent);
}

.trade-menu__item.is-active {
  background: #e8efff;
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(51, 124, 255, 0.18);
}

.trade-body {
  min-width: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.summary-card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #1f2d3d;
}

.summary-grid.two-cols {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.chart-card {
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 14px 16px 28px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-top: 8px;
  min-height: 260px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.line-chart {
  width: 100%;
  height: 180px;
}

.leader-card {
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.leader-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.leader-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.leader-list {
  display: grid;
  gap: 8px;
}

.leader-item {
  display: grid;
  grid-template-columns: 40px 44px 1fr 120px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fafbff;
}

.leader-rank {
  font-weight: 800;
  font-size: 16px;
}

.leader-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b7cff, #45c3b3);
}

.leader-name {
  font-weight: 700;
  color: #2f3a4e;
}

.leader-score {
  text-align: right;
  font-weight: 700;
  color: #2b7cff;
}

.leader-item.gold {
  border-color: #f4d35e;
  background: linear-gradient(90deg, rgba(244, 211, 94, 0.12), #fff);
}

.leader-item.silver {
  border-color: #c8d3e6;
  background: linear-gradient(90deg, rgba(200, 211, 230, 0.12), #fff);
}

.leader-item.bronze {
  border-color: #d6a77a;
  background: linear-gradient(90deg, rgba(214, 167, 122, 0.12), #fff);
}

.trade-panel {
  display: none;
}

.trade-panel.is-active {
  display: block;
}

.accounts-card {
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px 14px 20px;
}

.accounts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.accounts-actions {
  display: flex;
  gap: 8px;
}

.accounts-table {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  overflow: hidden;
}

.accounts-header {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr) 220px;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf3;
  padding: 10px 12px;
  font-weight: 600;
  color: #3a4252;
}

.accounts-row {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr) 220px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}
.account-main {
  display: flex;
  gap: 10px;
  align-items: center;
}
.account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f4fa;
  border: 1px solid #e2e8f3;
}
.account-meta {
  display: grid;
  gap: 2px;
}
.account-title {
  font-weight: 600;
}
.account-sub {
  color: var(--muted);
  font-size: 12px;
}

.purchase-cell {
  cursor: pointer;
}

.label-cell {
  cursor: pointer;
}

.pill-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(43, 124, 255, 0.08);
  border: 1px dashed rgba(43, 124, 255, 0.35);
  color: #2b7cff;
  font-size: 12px;
}

.presenter-wrap {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #f9fbff;
}
.presenter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #4a5465;
  margin-bottom: 8px;
}
.presenter-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.presenter-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.presenter-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5eaf2;
}
.presenter-card img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.presenter-meta {
  display: grid;
  gap: 2px;
  font-size: 12px;
}
.presenter-meta .muted {
  font-size: 11px;
}
.select-locked {
  opacity: 0.6;
  filter: blur(0.6px);
  pointer-events: none;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot.is-online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}
.status-dot.is-offline {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.cell {
  padding: 4px 6px;
}

.cell-check {
  display: flex;
  align-items: center;
}

.accounts-empty {
  padding: 70px 0 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: #fff;
}

.accounts-empty__img {
  width: 96px;
  height: 96px;
  opacity: 0.8;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
}

.hero__text h1 {
  margin: 6px 0 12px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.2;
}

.hero__text .lede {
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 18px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.hero__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.hero__panel {
  width: 100%;
}

.panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e4e8ee;
  padding: 16px;
}

.panel--glass {
  backdrop-filter: blur(0px);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
}

.panel__body {
  display: grid;
  gap: 14px;
}

.stat {
  background: #fff;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #e8edf3;
}

.stat__value {
  font-size: 28px;
  font-weight: 700;
}

.stat__label {
  color: var(--muted);
  font-size: 14px;
}

.divider {
  height: 1px;
  background: var(--border);
}

.list {
  display: grid;
  gap: 10px;
}

.list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.list__title {
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot--green {
  background: #4fd1c5;
  box-shadow: 0 0 12px rgba(79, 209, 197, 0.5);
}

.dot--amber {
  background: #f6c344;
}

.dot--blue {
  background: #5ea2ff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.badge--accent {
  border-color: rgba(79, 209, 197, 0.6);
  color: var(--accent);
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
}

.pill--success {
  color: #4fd1c5;
  border-color: rgba(79, 209, 197, 0.5);
}

.pill--warn {
  color: #f6c344;
  border-color: rgba(246, 195, 68, 0.5);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 6px;
}

.card__head h2 {
  margin: 0 0 8px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.metric {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 12px;
}

.metric__value {
  font-size: 22px;
  font-weight: 700;
}

.metric__label {
  color: var(--muted);
  font-size: 13px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8edf3;
}

.feature__icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.feature__title {
  font-weight: 700;
  margin-bottom: 4px;
}

.feature__desc {
  color: var(--muted);
  font-size: 14px;
}

.deploy {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
}

.steps {
  margin: 0 0 10px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.steps code {
  background: #f1f4fa;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text);
}

.cta {
  background: #f7f9fc;
  border: 1px solid #e4e8ee;
  border-radius: 14px;
  padding: 16px;
}

.cta__actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.footer {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.section {
  display: none;
}

.section.is-active {
  display: block;
}

/* 交易助手表单与表格 */
.notice {
  background: #f6f9ff;
  border: 1px solid #dfe7f7;
  border-radius: 12px;
  padding: 14px 16px;
  color: #1f3b73;
  margin-bottom: 16px;
}

.notice strong {
  color: #d9534f;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  padding: 10px 12px;
  border: 1px solid #d7dde8;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(51, 120, 255, 0.25);
  border-color: #3378ff;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0 14px;
}

.table-head {
  display: grid;
  grid-template-columns: 120px 1fr 120px 120px 140px 120px;
  gap: 8px;
  padding: 12px;
  background: #f7f9fc;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  font-weight: 600;
  color: #4a5465;
}

.table-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px 120px 140px 120px;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #eaeff5;
  background: #fff;
}

@media (max-width: 960px) {
  .topbar {
    position: static;
    margin: 0 0 24px;
    border-radius: 12px;
  }

  .hero,
  .deploy {
    grid-template-columns: 1fr;
  }

  .trade-layout {
    grid-template-columns: 1fr;
  }

  .trade-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
  }

  .trade-menu__item {
    margin-bottom: 0;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .page {
    padding: 20px 14px 60px;
  }

  .nav {
    display: none;
  }

  .hero__actions,
  .cta__actions {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .task-modal-card {
    width: min(94vw, 600px);
    max-height: 90vh;
    padding: 18px;
  }
  .task-filters {
    grid-template-columns: 1fr;
  }
  .task-id-row {
    grid-template-columns: 1fr;
  }
  .task-item .task-item-row {
    grid-template-columns: 1fr;
  }
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}
.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 35, 0.35);
  backdrop-filter: blur(4px);
}
.auth-modal__card {
  position: relative;
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 30, 60, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 28px 32px;
  display: grid;
  gap: 20px;
}
.task-modal-card {
  width: min(980px, 94vw);
  max-height: 82vh;
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
}
.task-modal-body {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 2px 10px;
  flex: 1;
  min-height: 0;
}
.auth-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-modal__head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a2332;
}
.auth-modal__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.auth-modal__body {
  display: grid;
  gap: 18px;
}
.auth-modal__body label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #3a4556;
}
.auth-modal__body input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: #f8fafc;
  color: #1a2332;
  transition: all 0.2s ease;
}
.auth-modal__body input::placeholder {
  color: #a0aec0;
}
.auth-modal__body input:hover {
  border-color: #cbd5e0;
  background: #fff;
}
.auth-modal__body input:focus {
  outline: none;
  border-color: #2b7cff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(43, 124, 255, 0.1);
}
.auth-modal__foot .btn--primary {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 12px;
}
.auth-msg {
  min-height: 20px;
  font-size: 13px;
  color: #e53e3e;
  text-align: center;
  padding: 4px 0;
}

.account-card {
  width: min(640px, 94vw);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16);
}
.purchase-card {
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.purchase-card .auth-modal__body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}
.purchase-card .auth-modal__foot {
  margin-top: 6px;
}
.c5-login-card {
  width: min(520px, 92vw);
}
.c5-qr-wrap {
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
}
.c5-qr-image {
  width: 220px;
  height: 220px;
  border-radius: 16px;
  background: #f5f7fb;
  border: 1px solid #e2e8f3;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.c5-qr-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.c5-qr-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.account-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 16px;
}
.account-modal__grid label {
  font-weight: 700;
  color: #1f2d3d;
}
.account-modal__grid input,
.account-modal__grid select {
  margin-top: 6px;
  width: 100%;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  padding: 11px 12px;
  background: #f7f9fc;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.account-modal__grid input:focus,
.account-modal__grid select:focus {
  outline: none;
  border-color: #2b7cff;
  box-shadow: 0 0 0 3px rgba(43, 124, 255, 0.16);
  background: #fff;
}

.access-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  color: var(--muted);
}
.access-banner.is-ok {
  background: rgba(69, 195, 179, 0.12);
  border-color: rgba(69, 195, 179, 0.35);
  color: #1e6f63;
}
.access-banner.is-warn {
  background: rgba(255, 184, 76, 0.12);
  border-color: rgba(255, 184, 76, 0.4);
  color: #7a4a00;
}
.access-banner.is-error {
  background: rgba(233, 92, 92, 0.12);
  border-color: rgba(233, 92, 92, 0.35);
  color: #8a1f1f;
}

.task-form {
  display: grid;
  gap: 10px;
}
.task-form textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
}

.task-panel {
  display: grid;
  gap: 14px;
}
.task-toolbar {
  display: grid;
  gap: 10px;
}
.task-search {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.task-search input {
  flex: 1;
  min-width: 220px;
}
.task-search input,
.task-filters select,
.task-id-row input {
  border: 1px solid #dde3ee;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f7f9fc;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.task-search input:focus,
.task-filters select:focus,
.task-id-row input:focus {
  outline: none;
  border-color: #2b7cff;
  box-shadow: 0 0 0 3px rgba(43, 124, 255, 0.16);
  background: #fff;
}
.task-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
}
.task-id-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.task-id-result {
  display: grid;
  gap: 10px;
}
.task-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-content: start;
}
.task-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}
.task-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #f6f7fb;
  border-radius: 8px;
}
.task-card .task-name {
  font-weight: 600;
  font-size: 13px;
}
.task-card .task-meta {
  color: var(--muted);
  font-size: 12px;
}
.task-list-head {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-limit {
  font-size: 12px;
  color: var(--muted);
}
.task-list {
  display: grid;
  gap: 8px;
}
.task-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.task-item .task-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.task-item .task-item-head > div:first-of-type {
  flex: 1;
  min-width: 0;
}
.task-profit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f0f4f8;
  font-size: 14px;
  font-weight: 600;
  color: #8492a6;
  cursor: help;
  white-space: nowrap;
}
.task-profit.profit-positive {
  background: #d1fae5;
  color: #059669;
}
.task-profit.profit-negative {
  background: #fee2e2;
  color: #dc2626;
}
.task-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #f6f7fb;
  border-radius: 8px;
}
.task-item .task-item-name {
  font-weight: 600;
}
.task-item .task-item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.task-item .task-item-row input {
  width: 100px;
  flex: 0 0 100px;
  border: 1px solid #dde3ee;
  border-radius: 10px;
  padding: 9px 10px;
  background: #f7f9fc;
  font-size: 13px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.task-item .task-item-row input:focus {
  outline: none;
  border-color: #2b7cff;
  box-shadow: 0 0 0 3px rgba(43, 124, 255, 0.16);
  background: #fff;
}
.task-item .task-item-row .btn {
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.task-item .task-item-row .task-item-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.task-item .task-item-check {
  flex: 0 0 20px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2b7cff;
}

/* 任务列表搜索 */
.task-list-search {
  display: flex;
  gap: 8px;
  flex: 1;
  margin-left: 12px;
}
.task-list-search input {
  flex: 1;
  min-width: 160px;
  border: 1px solid #dde3ee;
  border-radius: 10px;
  padding: 8px 12px;
  background: #f7f9fc;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.task-list-search input:focus {
  outline: none;
  border-color: #2b7cff;
  box-shadow: 0 0 0 3px rgba(43, 124, 255, 0.16);
  background: #fff;
}

/* 任务工具栏改为 flex */
.task-panel > .task-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.task-toolbar .btn--danger {
  background: #fee2e2;
  color: #dc2626;
  border: none;
}
.task-toolbar .btn--danger:hover {
  background: #fecaca;
}
.task-toolbar .btn--danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 任务列表头 */
.task-list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  padding: 4px 0;
}
.task-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 13px;
  cursor: pointer;
}
.task-select-all input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 批量添加渠道2配置 */
.batch-channel2-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #e0f2fe;
  border-radius: 10px;
  border: 1px solid #7dd3fc;
}
.batch-channel2-config label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
}
.batch-channel2-config input {
  padding: 8px 10px;
  border: 1px solid #dde3ee;
  border-radius: 8px;
  font-size: 14px;
}
.batch-channel2-config .muted {
  grid-column: 1 / -1;
}

/* 批量添加筛选 */
.batch-filter {
  margin-bottom: 10px;
}
.batch-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.batch-filter-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.batch-filter-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2b7cff;
}

/* 渠道2任务样式 */
.task-item.channel2-task {
  border-left: 3px solid #2b7cff;
}
.task-item.channel2-task .task-item-row.channel2-actions {
  gap: 10px;
}

/* 渠道2区间详情面板 */
.channel2-intervals-panel {
  padding: 12px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.channel2-intervals-header {
  display: grid;
  grid-template-columns: 100px 80px 80px 70px 1fr;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 6px;
}
.channel2-interval {
  display: grid;
  grid-template-columns: 100px 80px 80px 70px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 4px;
}
.channel2-interval.disabled {
  opacity: 0.6;
  background: #fef2f2;
}
.channel2-interval .range {
  font-weight: 500;
  font-family: monospace;
}
.channel2-interval .market {
  color: #64748b;
}
.channel2-interval .price {
  color: #2563eb;
  font-weight: 500;
}
.channel2-interval .price-edit {
  display: flex;
  align-items: center;
}
.channel2-interval .price-edit input {
  width: 70px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  color: #2563eb;
  font-weight: 500;
  text-align: right;
}
.channel2-interval .price-edit input:focus {
  outline: none;
  border-color: #2b7cff;
  box-shadow: 0 0 0 2px rgba(43, 124, 255, 0.2);
}
.channel2-interval.disabled .price-edit input {
  background: #fef2f2;
  color: #94a3b8;
}
.channel2-interval .profit {
  color: #64748b;
}
.channel2-interval .profit.profit-positive {
  color: #059669;
  font-weight: 600;
}
.channel2-interval .profit.profit-negative {
  color: #dc2626;
  font-weight: 600;
}
.channel2-interval .reason {
  color: #dc2626;
  font-size: 12px;
}

/* 区间面板底部 */
.channel2-intervals-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.channel2-intervals-footer .btn {
  padding: 6px 16px;
  font-size: 13px;
}
.intervals-save-msg {
  font-size: 13px;
}

/* 筛选栏的「添加整个收藏品」按钮 */
.task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.task-filters select {
  min-width: 140px;
}

/* 批量添加弹窗 */
.batch-modal-card {
  width: min(700px, 94vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.batch-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.batch-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.batch-list {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 4px;
  max-height: 400px;
}
.batch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  transition: box-shadow .2s ease;
}
.batch-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.batch-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.batch-item-info {
  flex: 1;
  min-width: 0;
}
.batch-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-item-meta {
  font-size: 11px;
  color: #8492a6;
  margin-top: 2px;
}
.batch-item .btn--delete {
  padding: 4px 8px;
  font-size: 12px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.batch-item .btn--delete:hover {
  background: #fecaca;
}
.batch-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

/* 任务排序 */
.task-sort select {
  padding: 8px 12px;
  border: 1px solid #dde3ee;
  border-radius: 10px;
  background: #f7f9fc;
  font-size: 14px;
  cursor: pointer;
}
.task-sort select:focus {
  outline: none;
  border-color: #2b7cff;
}

/* 渠道2一键定价 */
.channel2-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.channel2-config label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
}
.channel2-config input {
  padding: 10px 12px;
  border: 1px solid #dde3ee;
  border-radius: 10px;
  font-size: 15px;
}
.channel2-result {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 14px;
}
.channel2-result .success {
  color: #059669;
  font-weight: 600;
}
.channel2-result .failed {
  color: #dc2626;
}

/* 渠道2任务列表 */
.channel2-task-list {
  display: grid;
  gap: 10px;
}
.channel2-task-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.channel2-task-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: background .2s ease;
}
.channel2-task-head:hover {
  background: #f8fafc;
}
.channel2-task-head img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #f6f7fb;
  border-radius: 8px;
}
.channel2-task-info {
  flex: 1;
  min-width: 0;
}
.channel2-task-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel2-task-meta {
  font-size: 13px;
  color: #8492a6;
  margin-top: 2px;
}
.channel2-task-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}
.channel2-task-stats .stat {
  text-align: center;
}
.channel2-task-stats .stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #059669;
}
.channel2-task-stats .stat-label {
  font-size: 11px;
  color: #8492a6;
}
.channel2-task-expand {
  color: #8492a6;
  font-size: 20px;
}
.channel2-task-body {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
}
.channel2-task-body.is-open {
  display: block;
}
.channel2-intervals {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.channel2-interval {
  display: grid;
  grid-template-columns: 100px 80px 80px 70px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
}
.channel2-interval.disabled {
  opacity: 0.5;
  background: #fee2e2;
}
.channel2-interval .range {
  font-weight: 500;
}
.channel2-interval .profit {
  color: #059669;
  font-weight: 600;
}
.channel2-interval .reason {
  color: #dc2626;
  font-size: 12px;
}
