:root {
  --bg: #0a0a0a;
  --bg2: #121212;
  --card: #141414;
  --border: rgba(255, 255, 255, 0.13);
  --text: #f2f2f2;
  --muted: #8a8f98;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.15);
  --orange: #fb923c;
  --green: #4ade80;
  --red: #f87171;
  --amber: #fbbf24;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  background-image: radial-gradient(
      ellipse 120% 80% at 50% -20%,
      rgba(34, 211, 238, 0.08),
      transparent 50%
    ),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

/* PC：左侧图表区 300–720px，右侧事件卡片列 min 300px 自适应；窄屏单列堆叠 */
.top-bar {
  display: grid;
  grid-template-columns: minmax(300px, 720px) minmax(300px, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  align-items: stretch;
}

.top-bar > .okx-hero,
.top-bar .card-body-wrap {
  min-width: 0;
}

/* 右侧列与左侧图表区同高，卡片撑满该列 */
.top-bar .card-body-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.top-bar .card-body-wrap .card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 16px;
}

/* 中间「隐含概率」块吃掉纵向余量，避免底部大块留白 */
.top-bar > div > .card > aside.price-vs-open + aside.odds-gauge-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: top;
  min-height: 0;
}

@media (max-width: 900px) {
  .top-bar {
    grid-template-columns: 1fr;
  }
}

.okx-hero {
  position: relative;
  border-radius: 14px;
  padding: 22px 22px 18px;
  /* background: linear-gradient(145deg, #151515 0%, #0c0c0c 100%); */
  border: 0.5px solid var(--border);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.45);
}

.okx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(34, 211, 238, 0.12),
    transparent 45%
  );
  pointer-events: none;
}

.okx-label {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.okx-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
}

.okx-row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.price-vs-open {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  min-width: 148px;
}

.price-vs-open > div:first-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  align-self: flex-start;
  padding-top: 2px;
}

.pvo-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.pvo-line {
  text-align: center;
  width: 100%;
}

.pvo-line--spot {
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.pvo-spot-source {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.pvo-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.pvo-value {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pvo-delta {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pvo-delta.pvo-up {
  color: var(--green);
}

.pvo-delta.pvo-down {
  color: var(--red);
}

.pvo-delta.pvo-flat {
  color: var(--muted);
}

@media (max-width: 520px) {
  .price-vs-open {
    width: 100%;
    text-align: left;
  }

  .pvo-line {
    justify-content: space-between;
  }
  .card-body{
    grid-template-columns: 1fr!important;
  }
  .card-body__account {
    display: flex!important;
    justify-content: start!important;
    align-items: center!important;
  }
  .top-bar .card-body-wrap {
    grid-template-columns: 1fr!important;
  }
}

.okx-price {
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.45),
    0 0 60px rgba(34, 211, 238, 0.15);
}

.okx-pair {
  font-size: 13px;
  color: var(--cyan);
  font-weight: 600;
}

.okx-tf-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tf-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tf-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.tf-btn.active {
  color: #0ecb81;
  border-color: rgba(14, 203, 129, 0.45);
  background: rgba(14, 203, 129, 0.12);
}

.okx-chart-wrap {
  position: relative;
  margin-top: 12px;
  width: 100%;
  height: min(28vh, 240px);
  min-height: 240px;
  border-radius: 10px;
  border: none;
  background: #0c0c0c;
  overflow: hidden;
}

.okx-chart {
  width: 100%;
  height: 100%;
  min-height: 240px;
  min-width: 200px;
  position: relative;
}

.chart-fallback {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.meta-strip {
  position: relative;
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.slug-pill {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.live-dot.urgent i {
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
  animation: pulse-fast 0.9s ease-in-out infinite;
}

.live-dot.closed i {
  background: var(--muted);
  box-shadow: none;
  animation: none;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes pulse-fast {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.15);
  }
}

.grid-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 960px) {
  .grid-main {
    grid-template-columns: 1fr;
  }
}

.card {
  border-radius: 14px;
  /* background: var(--card); */
  background: linear-gradient(145deg, #1b34566b 0%, #0c0c0c0a 100%);
  border: 0.5px solid var(--border);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.45);
}

.card-banner {
  text-align: center;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border-bottom: 1px solid var(--border);
}
.card-banner-wrap{
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}

.card-banner-wrap-inner{
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 160px;
  max-height: min(420px, 55vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-banner.warn {
  background: linear-gradient(90deg, #422006, #1c1006);
  color: var(--orange);
}

.card-banner--pm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 14px;
}

.card-banner--pm .card-banner-pm-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-banner--pm .card-banner-pm-time {
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: none;
  line-height: 1.15;
}

.card-banner--pm .card-banner-pm-time.urgent {
  color: var(--red);
  text-shadow: 0 0 20px rgba(248, 113, 113, 0.35);
}

.card-banner--pm .card-banner-pm-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  line-height: 1.35;
  max-width: 22em;
}

.card-banner--pm.warn .card-banner-pm-label,
.card-banner--pm.warn .card-banner-pm-sub {
  color: inherit;
  opacity: 0.95;
}

.card-banner--pm.warn .card-banner-pm-time {
  color: inherit;
  font-size: clamp(1rem, 3vw, 1.25rem);
}

.card-body {
  padding: 20px 20px 16px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}

.event-title-wrap {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.card-body__account {
  display: flex;
  justify-content: end;
  align-items: center;
  min-width: 0;
  text-align: right;
}

.event-title--account-stats {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 20px;
}

.event-title-stat {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  align-items: center;
}

.event-title-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}

.event-title-stat-value {
  font-weight: 700;
}
.event-title-stat-value--primary {
  color: var(--cyan);
  font-size: 1.85rem;
  line-height: 1.25;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.45), 0 0 60px rgba(34, 211, 238, 0.15);
}
.event-title-stat-value--secondary {
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.2;
}
.odds-gauge-container{
  margin-top: 16px;
}
.order-gauge-container{
  margin-top: 16px;
  min-height: 100px;
}
.buy-stake-total{
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cyan);
}
.event-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #0f0f0f;
}

.event-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-title-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 20px 20px;
}

/* 事件标题移到 top-bar 后，主卡片仅余统计行时保留上内边距 */
.card > .stats-row:first-child {
  padding-top: 20px;
}

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

.stat {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.stat label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.logs {
  margin-top: 20px;
}

.logs .market-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.logs .muted {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

/** 服务端 Polymarket / Chainlink·OKX 上游 WSS（URL + 连接态），随 snapshot / heartbeat 更新 */
.logs .server-ws-panel {
  margin-bottom: 10px;
  padding: 12px 12px 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text, #e8e8e8);
}

.logs .server-ws-panel__head {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.logs .server-ws-block {
  margin-bottom: 10px;
}
.logs .server-ws-block:last-child {
  margin-bottom: 0;
}

.logs .server-ws-block__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--text, #e8e8e8);
}

.logs .server-ws-url {
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
}

.logs .server-ws-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.logs .server-ws-badge--ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.logs .server-ws-badge--bad {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.buy-advice {
  margin-top: 14px;
  height: 230px;
}

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

.buy-advice-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.buy-advice-count {
  font-size: 11px;
  color: var(--muted);
}

.buy-advice-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.buy-advice-list-wrap {
  position: relative;
  min-height: 72px;
}

.buy-advice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: min(52vh, 320px);
  overflow-y: auto;
  height: 200px;
}

.buy-advice-list::-webkit-scrollbar {
  width: 6px;
}

.buy-advice-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.buy-advice-empty {
  margin: 0;
  padding: 20px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.buy-advice-empty .loader-wrap {
  padding: 0;
}

.buy-advice-empty .loader-wrap {
  padding: 0;
}

.buy-advice-list:not(:empty) + .buy-advice-empty {
  display: none;
}

.buy-advice-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.35;
}

.buy-advice-row:last-child {
  border-bottom: none;
}

.buy-advice-row__time {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.buy-advice-row__main {
  min-width: 0;
  color: var(--text);
}

.buy-advice-row__main .buy-advice-side {
  font-weight: 600;
}

.buy-advice-row__main .buy-advice-side--up {
  color: #4ade80;
}

.buy-advice-row__main .buy-advice-side--down {
  color: #fb7185;
}

.buy-advice-row__main .sep {
  color: var(--muted);
  margin: 0 4px;
}

.odds-gauge {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.buy-amount-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.buy-amt-btn {
  flex: 1 1 auto;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.buy-amt-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.buy-amt-btn:active {
  transform: scale(0.98);
}

.buy-stake-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.buy-stake-reset {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.buy-stake-reset:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.odds-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.odds-labels--outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.outcome-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.15s;
}
.outcome-btn:active {
  box-shadow: none;
}
.outcome-btn__name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
}

.outcome-book-row {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin: 2px 0 4px;
}

.outcome-book-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.outcome-book-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}

.outcome-book-val {
  font-size: 0.6rem;
  line-height: 1.2;
}

.outcome-btn--up .outcome-book-val {
  color: #e0fbff;
}

.outcome-btn--down .outcome-book-val {
  color: #fecaca;
}

.outcome-btn__pct--implied {
  margin-top: 2px;
  font-size: clamp(0.78rem, 2.2vw, 0.95rem);
  opacity: 0.92;
}

.outcome-btn__pct {
  font-size: clamp(0.85rem, 2.8vw, 1.1rem);
  font-weight: 700;
  line-height: 1.25;
}

.outcome-btn--up {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--cyan);
}

.outcome-btn--up .outcome-btn__pct {
  color: #e0fbff;
}

.outcome-btn--down {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.45);
  color: var(--red);
}

.outcome-btn--down .outcome-btn__pct {
  color: #fecaca;
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.countdown-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.error-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 13px;
}

.footer-note {
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.badge.closed {
  background: rgba(138, 143, 152, 0.12);
  color: var(--muted);
  border-color: rgba(138, 143, 152, 0.35);
}

.mono {
  font-variant-numeric: tabular-nums;
}

/* —— cssloader（与 OneProduct-Admin common.css 一致，配色适配暗色）—— */
.loadingBox {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.cssloader {
  width: 20px;
  height: 20px;
  display: inline-block;
  position: relative;
  transform: translateZ(0);
  animation-delay: -0.16s;
  top: -10px;
  color: var(--cyan);
}

.cssloader:before,
.cssloader:after,
.cssloader {
  border-radius: 50%;
  animation-fill-mode: both;
  animation: cssloader 1.8s infinite ease-in-out;
}

.cssloader:before {
  right: 100%;
  animation-delay: -0.32s;
}

.cssloader:after {
  left: 100%;
}

.cssloader:before,
.cssloader:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  width: inherit;
  height: inherit;
}

.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 16px;
  color: var(--muted);
}

.loader-wrap--inline {
  display: inline-flex;
  flex-direction: row;
  padding: 0;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
}

.card-banner-pm-sub--loading .cssloader {
  top: 0;
}

@-webkit-keyframes cssloader {
  0%,
  80%,
  100% {
    box-shadow: 0 20px 0 -20px;
  }
  40% {
    box-shadow: 0 20px 0 -4px;
  }
}

@keyframes cssloader {
  0%,
  80%,
  100% {
    box-shadow: 0 20px 0 -20px;
  }
  40% {
    box-shadow: 0 20px 0 -4px;
  }
}

/* —— 登录页（与 Wether 同系） —— */
.ids-panel {
  margin-top: 28px;
  padding: 18px 20px 20px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ids-panel__head {
  margin-bottom: 14px;
}

.ids-panel__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.ids-panel__desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.ids-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.ids-panel__btn {
  cursor: pointer;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--bg);
  background: linear-gradient(165deg, #5eead4, var(--cyan));
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.25);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}

.ids-panel__btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.32);
}

.ids-panel__btn:active {
  transform: scale(0.98);
}

.ids-panel__hint {
  font-size: 12px;
  color: var(--green);
}

.ids-panel__hint--err {
  color: var(--red);
}

.login-app {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 48px;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
}

.login-card {
  margin-top: 0;
}

.login-form {
  margin-top: 4px;
}

.login-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.login-label--spaced {
  margin-top: 14px;
}

.login-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.login-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.header-logout {
  flex-shrink: 0;
  cursor: pointer;
  margin-left: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.header-logout:hover {
  color: var(--text);
  background: rgba(34, 211, 238, 0.08);
}

.header-logout:active {
  transform: scale(0.98);
}

/* —— 我的订单 + 卖出操控台（对齐 Wether）—— */
.side-orders-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 1 auto;
  min-height: 0;
}

.side-orders-stack .orders:first-child {
  margin-top: 0;
}

.orders {
  margin-top: 16px;
}

.orders .market-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.orders-meta-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--amber);
  min-height: 0;
}

.orders-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.orders-tab {
  flex: 1;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.orders-tab:hover {
  color: var(--text);
}

.orders-tab--active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.orders-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 160px;
  max-height: min(420px, 55vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.orders-panel[hidden] {
  display: none !important;
}

.orders-body {
  padding: 10px;
  overflow: auto;
  flex: 1;
  font-size: 11px;
  line-height: 1.4;
  max-height: 390px;
}

.orders-empty {
  margin: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.orders-empty--err {
  color: var(--red);
}

.orders-body .loadingBox {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poly-pos-list,
.poly-hist-list,
.poly-open-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poly-open-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 10px;
  border-radius: 10px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  font-size: 11px;
}

.poly-open-row__left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 140px;
  min-width: 0;
}

.poly-open-row__thumb {
  flex-shrink: 0;
}

.poly-open-row__meta {
  min-width: 0;
  flex: 1;
}

.poly-open-row__title {
  -webkit-line-clamp: 2;
}

.poly-open-row__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 4px;
}

.poly-open-row__side {
  font-size: 11px;
  color: var(--muted);
}

.poly-open-row__badge {
  font-size: 10px;
  padding: 2px 7px;
}

.poly-open-row__mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.poly-open-row__fill,
.poly-open-row__unit {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.poly-open-row__fill {
  min-width: 3.2em;
  text-align: center;
}

.poly-open-row__unit {
  min-width: 2.8em;
  text-align: right;
}

.poly-open-cancel-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: var(--red);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.poly-open-cancel-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.55);
}

.poly-open-cancel-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.poly-open-cancel-btn--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.poly-pos-card,
.poly-hist-card {
  padding: 10px 10px 10px;
  border-radius: 10px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
}

.poly-pos-card--sell-active {
  background: rgba(34, 211, 238, 0.1);
  border: 0.5px solid rgba(34, 211, 238, 0.55);
}

.poly-pos-card__market,
.poly-hist-card__market {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.poly-od-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.poly-od-thumb--ph {
  display: block;
}

.poly-pos-card__meta,
.poly-hist-card__meta {
  min-width: 0;
  flex: 1;
}

.poly-od-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a.poly-od-title.poly-od-title--ext {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.poly-od-title.poly-od-title--ext:hover {
  text-decoration: underline;
  color: var(--cyan);
}

.poly-pos-card__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 3px;
}

.poly-od-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(74, 222, 128, 0.18);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.poly-od-shares {
  font-size: 11px;
  color: var(--muted);
}

.poly-pos-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 11px;
}

.poly-pos-dl > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poly-pos-dl dt {
  margin: 0;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.poly-pos-dl dd {
  margin: 0;
  color: var(--text);
}

.poly-od-strong {
  font-weight: 700;
  font-size: 12px;
}

.poly-pnl--up {
  color: var(--green);
  font-weight: 600;
  font-size: 11px;
}

.poly-pnl--down {
  color: var(--red);
  font-weight: 600;
  font-size: 11px;
}

.poly-pnl--flat {
  color: var(--muted);
  font-size: 11px;
}

.poly-pos-card__action {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.poly-pos-card__sells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}

.poly-od-sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--red);
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(235, 83, 37, 0.35);
  border: 0.5px solid var(--red);
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.12s ease;
  background: transparent;
}

button.poly-od-sell {
  margin: 0;
}

.poly-od-sell:hover {
  filter: brightness(1.06);
}

.poly-od-sell:active {
  transform: scale(0.98);
}

.poly-od-sell--limit {
  color: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.22);
}

.poly-od-sell--limit.poly-od-sell--disabled {
  color: var(--muted);
  border-color: var(--border);
  box-shadow: none;
}

.poly-od-sell--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--muted);
  box-shadow: none;
}

.poly-hist-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poly-hist-card__main {
  min-width: 0;
}

.poly-hist-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.poly-hist-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
}

.poly-hist-card__aside {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.poly-hist-val {
  font-size: 13px;
  font-weight: 700;
}

.poly-hist-time {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.sell-order-panel .sell-mode-tabs {
  margin-top: 4px;
}

.sell-order-panel .sell-mode-tab--active {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.12);
}

.sell-stake-line {
  margin-top: 4px;
}

.sell-stake-total {
  color: var(--amber);
}

.sell-stake-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.sell-stake-line--warn .sell-stake-total {
  color: var(--red);
}

.sell-share-strip {
  margin-bottom: 10px;
}

.sell-sync-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--amber);
}

.sell-odds-gauge {
  margin-bottom: 12px;
}

.sell-tabpanel {
  margin-top: 2px;
}

.sell-panel-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.sell-market-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--bg);
  background: linear-gradient(135deg, #6dbf50 0%, #98e90e 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.sell-market-submit:hover:not(:disabled) {
  filter: brightness(1.06);
}

.sell-market-submit:active:not(:disabled) {
  transform: scale(0.99);
}

.sell-market-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sell-panel-hint--err {
  color: var(--red);
}

.sell-limit-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sell-limit-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.sell-limit-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 12px;
}

.sell-limit-input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12);
}

.sell-odds-gauge .odds-labels--outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.sell-odds-gauge .odds-labels--outcomes.odds-labels--single {
  grid-template-columns: 1fr;
}

.sell-odds-gauge .odds-labels--outcomes .outcome-btn[hidden] {
  display: none !important;
}

.sidebar-gauge-outcome-pct {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidebar-gauge-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 6px;
}

.outcome-btn--picked {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.65), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.outcome-btn--picked.outcome-btn--down {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.55), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.sell-order-panel.card {
  padding: 14px;
  margin-top: 0;
}
