/* Quant Bot first-level product shell — independent of Trade / Market layouts. */

/* Reuse Flash Swap primary CTA tokens (wl-terminal-redesign.css). Quant pages
   do not load that stylesheet, so the values are mirrored here — one green. */
.wl-quant-page {
  --wl-cta: #15965A;
  --wl-cta-active: #10804C;
  --wl-cta-disabled: #9BC7AF;
  --wl-cta-fg: #FFFFFF;
}

.wl-quant-page .wl-quant-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 0.9rem 6rem;
}

.wl-quant-hero {
  position: relative;
  margin-bottom: 0.85rem;
  padding: 0.85rem 0.95rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(16, 185, 129, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.18));
  overflow: hidden;
}

.wl-quant-hero-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.wl-quant-hero-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #0E7A4A;
  background: #E6F4EC;
  border: 1px solid #C4E2D0;
  filter: none;
}

.wl-quant-hero-icon svg,
.wl-quant-hero-icon .wl-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wl-quant-kicker {
  margin: 0 0 0.2rem;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0E7A4A;
  font-weight: 700;
}

.wl-quant-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: #334155;
}

.wl-quant-sub {
  margin: 0.2rem 0 0;
  font-size: 12px;
  color: #64748b;
  max-width: 46rem;
  line-height: 1.4;
}

.wl-quant-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
}

.wl-quant-section-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.wl-quant-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.wl-quant-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
}

.wl-quant-tab:hover {
  border-color: rgba(52, 211, 153, 0.45);
  color: #ecfdf5;
}

.wl-quant-tab.is-active,
html[data-theme="light"] .wl-quant-tab.is-active,
html[data-theme="dark"] .wl-quant-tab.is-active {
  color: var(--wl-cta-fg) !important;
  background: var(--wl-cta) !important;
  border-color: var(--wl-cta) !important;
  box-shadow: 0 6px 16px rgba(21, 150, 90, 0.22);
}

.wl-quant-gap {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid #D4B44A;
  background: #FFF4C8;
  color: #5C4308;
  font-size: 12px;
  line-height: 1.55;
  text-shadow: none;
  filter: none;
  box-shadow: none;
}

.wl-quant-robots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.85rem;
}

.wl-quant-robot-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.42);
  min-height: 220px;
}

.wl-quant-robot-card[data-status="available"] {
  border-color: rgba(52, 211, 153, 0.32);
}

.wl-quant-robot-card[data-status="quota_claimed"] {
  border-color: rgba(96, 165, 250, 0.35);
}

.wl-quant-robot-card[data-status="locked"] {
  opacity: 0.78;
}

.wl-quant-robot-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.wl-quant-robot-name {
  font-weight: 800;
  font-size: 15px;
}

.wl-quant-robot-meta {
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wl-quant-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #cbd5e1;
}

.wl-quant-stat-row span:last-child {
  color: #e2e8f0;
  font-weight: 650;
}

.wl-quant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

/* Flash Swap「连接钱包」primary: solid forest green, white label+icon,
   rounded card button, subtle elevation. One shared green on /quant*. */
.wl-quant-page .btn.btn-primary,
.wl-quant-page a.btn.btn-primary,
.wl-quant-page button.btn.btn-primary {
  color: var(--wl-cta-fg) !important;
  background: var(--wl-cta) !important;
  border: 1px solid var(--wl-cta) !important;
  border-radius: 15px !important;
  box-shadow: 0 6px 16px rgba(21, 150, 90, 0.22) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  filter: none !important;
}

.wl-quant-page .btn.btn-primary:hover,
.wl-quant-page .btn.btn-primary:focus-visible {
  background: var(--wl-cta-active) !important;
  border-color: var(--wl-cta-active) !important;
  color: var(--wl-cta-fg) !important;
  transform: none;
}

.wl-quant-page .btn.btn-primary:disabled,
.wl-quant-page .btn.btn-primary.opacity-60 {
  background: var(--wl-cta-disabled) !important;
  border-color: var(--wl-cta-disabled) !important;
  color: var(--wl-cta-fg) !important;
  box-shadow: none !important;
}

.wl-quant-page .btn.btn-primary i,
.wl-quant-page .btn.btn-primary .wl-icon {
  color: inherit !important;
}

.wl-quant-empty-icon {
  color: #2F5A43;
  filter: none;
}

@media (max-width: 767px) {
  .wl-quant-page .btn.btn-primary:not(.btn-xs):not(.text-xs):not(.bot-tab) {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

html[data-theme="light"] .wl-quant-hero {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(14, 122, 74, 0.08), transparent 52%),
    #ffffff;
  border-color: rgba(14, 122, 74, 0.18);
}

html[data-theme="light"] .wl-quant-title {
  color: #334155;
}

html[data-theme="light"] .wl-quant-sub,
html[data-theme="light"] .wl-quant-section-note {
  color: #64748b;
}

html[data-theme="dark"] .wl-quant-title {
  color: #e2e8f0;
}

html[data-theme="dark"] .wl-quant-section-note {
  color: #94a3b8;
}

html[data-theme="dark"] .wl-quant-tab {
  background: rgba(15, 23, 42, 0.45);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="light"] .wl-quant-tab {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wl-quant-tab.is-active {
  color: var(--wl-cta-fg) !important;
  background: var(--wl-cta) !important;
  border-color: var(--wl-cta) !important;
}

html[data-theme="dark"] .wl-quant-kicker {
  color: #7EE0B8;
}

html[data-theme="light"] .wl-quant-robot-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wl-quant-gap {
  background: #FFF4C8;
  border-color: #D4B44A;
  color: #5C4308;
}

html[data-theme="dark"] .wl-quant-hero-icon {
  color: #7EE0B8;
  background: #123528;
  border-color: #1F5A40;
}

html[data-theme="dark"] .wl-quant-gap {
  background: #3A3014;
  border-color: #8A7020;
  color: #F3E2A0;
  text-shadow: none;
  filter: none;
}

html[data-theme="dark"] .wl-quant-empty-icon {
  color: #8BB9A2;
}

@media (min-width: 1024px) {
  .wl-quant-page .wl-quant-shell {
    padding: 1.75rem 1.5rem 3rem;
  }
}
