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

/* Buy-one relist product layout */
.best-bid-page {
  max-width: 1180px;
  padding-top: 24px;
}

.best-bid-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.55);
  overflow: hidden;
}

.best-bid-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  filter: blur(8px);
  pointer-events: none;
}

.best-bid-hero-copy,
.best-bid-hero-actions {
  position: relative;
  z-index: 1;
}

.best-bid-hero-copy h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.best-bid-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.best-bid-hero-actions,
.best-bid-toolbar,
.best-bid-section-metrics,
.best-bid-rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.best-bid-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: -10px 0 22px;
}

.best-bid-status-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.34);
}

.best-bid-status-card span,
.best-bid-section-metrics span {
  color: #93a4ba;
  font-size: 12px;
}

.best-bid-status-card strong {
  display: block;
  margin: 8px 0 4px;
  color: #f8fafc;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.best-bid-status-card small {
  color: #7dd3fc;
  line-height: 1.35;
}

.best-bid-status-card.is-on {
  border-color: rgba(34, 197, 94, 0.38);
  background: linear-gradient(160deg, rgba(20, 83, 45, 0.35), rgba(15, 23, 42, 0.82));
}

.best-bid-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.best-bid-card {
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: 0 22px 56px rgba(2, 6, 23, 0.38);
}

.best-bid-config-card .positions-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.best-bid-config-card .positions-form-row {
  align-items: flex-start;
}

.best-bid-config-card .positions-form-row:nth-child(2),
.best-bid-config-card .positions-form-row:nth-child(3),
.best-bid-config-card .positions-form-row:nth-child(4),
.best-bid-config-card .positions-form-actions {
  grid-column: 1 / -1;
}

.best-bid-card-head,
.best-bid-section-head,
.best-bid-reward-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.best-bid-add-card {
  position: sticky;
  top: 16px;
}

.best-bid-add-form {
  display: grid;
  grid-template-columns: 1fr 88px 88px;
  gap: 10px;
  align-items: stretch;
  margin: 0;
}

.best-bid-add-form .positions-input,
.best-bid-add-form button {
  width: 100%;
}

.best-bid-note-input,
.best-bid-add-form button {
  grid-column: 1 / -1;
}

.best-bid-rule-list {
  margin-top: 16px;
  align-items: stretch;
}

.best-bid-rule-list span,
.best-bid-section-metrics span {
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.best-bid-market-section {
  margin-top: 0;
}

.best-bid-section-head {
  margin-bottom: 16px;
}

.best-bid-section-head .positions-section-title,
.best-bid-card-head .positions-section-title {
  margin-bottom: 6px;
}

.best-bid-toolbar {
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.28);
}

.best-bid-toolbar .positions-query-desc {
  margin: 0;
}

.best-bid-reward-card {
  padding: 16px 18px;
}

.best-bid-reward-card .positions-section-title {
  margin-bottom: 4px;
}

.best-bid-market-section .orders-table th,
.best-bid-market-section .orders-table td {
  padding: 12px 14px;
}

@media (max-width: 980px) {
  .best-bid-status-grid,
  .best-bid-setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .best-bid-add-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .best-bid-page {
    padding: 16px 12px 36px;
  }

  .best-bid-hero,
  .best-bid-card-head,
  .best-bid-section-head,
  .best-bid-reward-card > div:first-child {
    flex-direction: column;
    align-items: stretch;
  }

  .best-bid-status-grid,
  .best-bid-setup-grid,
  .best-bid-config-card .positions-form,
  .best-bid-add-form {
    grid-template-columns: 1fr;
  }

  .best-bid-status-card {
    min-height: auto;
  }
}

/* World Cup management page */
.world-cup-page {
  max-width: 1360px;
}

.world-cup-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  padding: 30px;
  margin-bottom: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(250, 204, 21, 0.18), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(34, 197, 94, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.55);
}

.world-cup-hero h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -0.05em;
}

.world-cup-hero p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #b6c5d8;
}

.world-cup-official-link {
  display: inline-flex;
  padding: 10px 14px;
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 999px;
  color: #fde68a;
  text-decoration: none;
  background: rgba(113, 63, 18, 0.28);
}

.world-cup-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.world-cup-summary-grid > div {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
}

.world-cup-summary-grid span,
.world-cup-summary-grid small,
.world-cup-meta dt {
  color: #93a4ba;
  font-size: 12px;
}

.world-cup-summary-grid strong {
  display: block;
  margin: 7px 0 4px;
  color: #f8fafc;
  font-size: 24px;
}

.world-cup-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.world-cup-controls,
.world-cup-actions,
.world-cup-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.world-cup-controls label {
  display: grid;
  gap: 6px;
  min-width: 140px;
  color: #9fb2c8;
  font-size: 12px;
}

.world-cup-actions {
  margin-top: 14px;
}

.world-cup-message {
  margin: 12px 0 0;
  color: #bae6fd;
}

.world-cup-config-health {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.world-cup-config-health span {
  font-weight: 800;
}

.world-cup-config-health .ok {
  color: #86efac;
}

.world-cup-config-health .bad {
  color: #fca5a5;
}

.world-cup-config-health small {
  color: #9fb2c8;
  word-break: break-all;
}

.world-cup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.world-cup-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.world-cup-pager button {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.78);
  color: #e2e8f0;
  cursor: pointer;
}

.world-cup-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.world-cup-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 16px;
}

.world-cup-match-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78));
}

.world-cup-match-card.is-expanded {
  grid-column: 1 / -1;
}

.world-cup-match-top {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.world-cup-match-top img,
.world-cup-ball {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
}

.world-cup-ball {
  display: grid;
  place-items: center;
  color: #111827;
  font-weight: 900;
  background: radial-gradient(circle at 35% 35%, #fef3c7, #f59e0b);
}

.world-cup-match-title {
  min-width: 0;
}

.world-cup-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.world-cup-title-row h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.world-cup-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  color: #9fb2c8;
  font-size: 12px;
}

.world-cup-link-row a {
  color: #93c5fd;
}

.world-cup-pp-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.26);
  color: #facc15;
  white-space: nowrap;
  font-size: 12px;
}

.world-cup-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.world-cup-tag {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(37, 99, 235, 0.14);
  color: #bfdbfe;
  font-size: 12px;
}

.world-cup-tag.muted {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}

.world-cup-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.world-cup-meta div {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.28);
}

.world-cup-meta dd {
  margin: 3px 0 0;
  color: #e2e8f0;
  font-size: 12px;
}

.world-cup-preview-list {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.2);
  color: #cbd5e1;
  font-size: 12px;
}

.world-cup-preview-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-cup-expand-btn {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  cursor: pointer;
}

.world-cup-child-list {
  display: grid;
  gap: 10px;
}

.world-cup-section-shell {
  display: grid;
  gap: 12px;
}

.world-cup-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.18);
}

.world-cup-section-tabs button {
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 10px 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  cursor: pointer;
  text-align: left;
}

.world-cup-section-tabs button.active {
  border-color: rgba(96, 165, 250, 0.6);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 233, 0.12));
  color: #eff6ff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.world-cup-section-tabs span {
  font-weight: 800;
}

.world-cup-section-tabs small {
  color: #93c5fd;
  font-size: 11px;
}

.world-cup-child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.22);
}

.world-cup-child-row strong {
  display: block;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.35;
}

.world-cup-child-row span {
  display: block;
  margin-top: 4px;
  color: #bfdbfe;
  font-size: 12px;
}

.world-cup-child-row small {
  display: block;
  margin-top: 5px;
  color: #9fb2c8;
  font-size: 12px;
}

.world-cup-child-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.world-cup-child-actions button,
.world-cup-tracked-item button {
  padding: 7px 10px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  cursor: pointer;
}

.world-cup-tracked-panel {
  position: static;
}

.world-cup-tracked-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.world-cup-tracked-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.3);
}

.world-cup-tracked-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #e2e8f0;
}

.world-cup-tracked-check input {
  margin-top: 3px;
}

.world-cup-tracked-check.muted {
  color: #9fb2c8;
  font-size: 12px;
}

.world-cup-inline-control {
  display: grid;
  gap: 5px;
  color: #9fb2c8;
  font-size: 12px;
}

.world-cup-inline-control .positions-input {
  max-width: 120px;
  min-height: 34px;
  padding: 7px 10px;
}

.world-cup-tracked-item strong {
  color: #f8fafc;
  font-size: 13px;
}

.world-cup-tracked-item span,
.world-cup-tracked-item small {
  color: #9fb2c8;
  font-size: 12px;
}

.world-cup-level-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.world-cup-level-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.world-cup-level-badge.ok {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(22, 101, 52, 0.18);
}

.world-cup-level-badge.bad {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(127, 29, 29, 0.48);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.12), 0 8px 20px rgba(127, 29, 29, 0.18);
}

.world-cup-level-badge.sell {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.42);
  background: rgba(76, 29, 149, 0.22);
}

.world-cup-level-badge.neutral {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.35);
}

.world-cup-level-badge.target {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(30, 64, 175, 0.18);
}

.world-cup-level-badge.reward-on {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.46);
  background: rgba(113, 63, 18, 0.28);
}

.world-cup-level-badge.reward-off {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.28);
}

.world-cup-level-price {
  color: #cbd5e1 !important;
  font-weight: 700;
}

/* Order board terminal */
.order-board-page {
  width: min(1880px, calc(100vw - 28px));
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 36px;
  color: #e5e7eb;
}

.order-board-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  border-radius: 18px;
  background: rgba(11, 15, 25, 0.8);
}

.order-board-nav span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #9ca3af;
  font-weight: 800;
}

.order-board-nav span.active {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(124, 58, 237, 0.38));
}

.order-board-status {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(31, 41, 55, 0.95);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.94));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.32);
}

.order-board-status h1,
.order-board-workbar h2,
.order-board-side-panel h3 {
  margin: 0;
  color: #f8fafc;
}

.order-board-status p,
.order-board-workbar p {
  margin: 7px 0 0;
  color: #9ca3af;
}

.order-board-actions,
.order-board-batch,
.order-board-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.order-board-actions button,
.order-board-batch button,
.order-board-modal-actions button,
.order-board-main-card,
.order-board-table button {
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 12px;
  background: rgba(30, 64, 175, 0.28);
  color: #dbeafe;
  cursor: pointer;
  font-weight: 800;
}

.order-board-actions button,
.order-board-batch button,
.order-board-modal-actions button {
  padding: 10px 14px;
}

.order-board-actions button.danger,
.order-board-modal-actions button:first-child {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.36);
  color: #fecaca;
}

.order-board-actions button:disabled,
.order-board-batch button:disabled,
.order-board-table button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.order-board-message {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  background: rgba(30, 64, 175, 0.16);
  color: #bfdbfe;
}

.order-board-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(680px, 1fr) minmax(320px, 380px);
  gap: 16px;
  margin-top: 16px;
}

.order-board-left,
.order-board-center,
.order-board-right,
.order-board-side-panel,
.order-board-modal {
  border: 1px solid rgba(31, 41, 55, 0.95);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.86);
}

.order-board-left,
.order-board-center,
.order-board-right {
  padding: 14px;
  min-width: 0;
}

.order-board-section-title {
  margin-bottom: 12px;
  color: #93c5fd;
  font-weight: 900;
}

.order-board-main-card {
  width: 100%;
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 14px;
  text-align: left;
  background: rgba(15, 23, 42, 0.72);
}

.order-board-main-card.active {
  border-color: rgba(96, 165, 250, 0.62);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.34), rgba(15, 23, 42, 0.8));
}

.order-board-main-card span,
.order-board-empty,
.order-board-mini-note {
  color: #9ca3af;
  font-size: 12px;
}

.order-board-workbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px;
}

.order-board-batch input,
.order-board-batch select,
.order-board-modal input,
.order-board-modal select,
.order-board-modal textarea {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  padding: 8px 10px;
}

.order-board-batch input {
  width: 96px;
}

.order-board-table-wrap {
  overflow: auto;
  border-radius: 16px;
}

.order-board-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.order-board-table th,
.order-board-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  text-align: left;
  vertical-align: top;
}

.order-board-table th {
  position: sticky;
  top: 0;
  background: #111827;
  color: #93c5fd;
  font-size: 11px;
  text-transform: uppercase;
}

.order-board-table td strong,
.order-board-list-row strong {
  color: #f8fafc;
}

.order-board-table td small {
  display: block;
  margin-top: 4px;
  color: #9ca3af;
}

.order-board-table tr.muted {
  opacity: 0.5;
}

.order-board-status-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.order-board-status-pill.open {
  color: #86efac;
  background: rgba(22, 101, 52, 0.25);
}

.order-board-status-pill.closed {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.28);
}

.order-board-table .bid {
  color: #60a5fa;
  font-weight: 900;
}

.order-board-table .ask {
  color: #fb7185;
  font-weight: 900;
}

.order-board-table .strong {
  font-size: 15px;
}

.muted-text {
  opacity: 0.72;
}

.order-board-right {
  display: grid;
  gap: 14px;
  align-content: start;
}

.order-board-side-panel {
  padding: 14px;
}

.order-board-side-panel h3 {
  margin-bottom: 10px;
  color: #bfdbfe;
}

.order-board-metric,
.order-board-list-row,
.order-board-feed-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

.order-board-metric span,
.order-board-list-row span,
.order-board-feed-row span,
.order-board-feed-row small {
  color: #9ca3af;
}

.order-board-feed-row {
  display: grid;
  grid-template-columns: 72px 1fr;
}

.order-board-feed-row small {
  grid-column: 1 / -1;
}

.order-board-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.order-board-modal {
  width: min(680px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 22px;
}

.order-board-modal label {
  display: grid;
  gap: 7px;
  color: #bfdbfe;
}

.order-board-modal-desc {
  margin: 0;
  color: #9ca3af;
  line-height: 1.6;
}

.order-board-modal textarea {
  min-height: 130px;
}

.order-board-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1380px) {
  .order-board-shell {
    grid-template-columns: minmax(230px, 280px) minmax(560px, 1fr);
  }

  .order-board-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-board-status,
  .order-board-workbar {
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .order-board-page {
    width: calc(100vw - 16px);
  }

  .order-board-shell,
  .order-board-right,
  .order-board-modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .world-cup-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .world-cup-summary-grid,
  .world-cup-console,
  .world-cup-layout {
    grid-template-columns: 1fr;
  }

  .world-cup-tracked-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .world-cup-hero,
  .world-cup-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .world-cup-card-grid {
    grid-template-columns: 1fr;
  }

  .world-cup-match-top {
    grid-template-columns: 44px minmax(0, 1fr);
    padding-right: 0;
    align-items: start;
  }

  .world-cup-pp-badge {
    position: static;
    grid-column: 1 / -1;
    width: fit-content;
  }

  .world-cup-meta {
    grid-template-columns: 1fr;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(
    circle at top left,
    #0f172a,
    #020617 55%,
    #000000
  );
  color: #e5e7eb;
  min-height: 100vh;
}

.positions-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.positions-page:has(.order-board-page) {
  max-width: none;
  width: 100%;
  padding: 16px clamp(12px, 2vw, 32px) 42px;
  background: #f5f7fb;
}

/* Order board light workspace */
body:has(.order-board-page) {
  background: #f5f7fb;
  color: #0f172a;
}

.positions-page:has(.order-board-page) .main-page-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  overflow-x: auto;
  max-width: none;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.positions-page:has(.order-board-page) .main-page-tab {
  color: #475569;
}

.positions-page:has(.order-board-page) .main-page-tab.active {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.order-board-page {
  width: min(1680px, 100%);
  padding: 18px 0 44px;
  color: #0f172a;
}

.order-board-nav,
.order-board-status,
.order-board-left,
.order-board-center,
.order-board-right,
.order-board-side-panel,
.order-board-modal {
  border-color: #dbe4f0;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.order-board-nav {
  overflow-x: auto;
  align-items: center;
  border-radius: 16px;
}

.order-board-nav span {
  color: #475569;
  white-space: nowrap;
}

.order-board-nav span.active {
  color: #ffffff;
  background: #2563eb;
}

.order-board-status {
  top: 10px;
  background: linear-gradient(135deg, #ffffff, #eef6ff);
}

.order-board-status h1,
.order-board-workbar h2,
.order-board-side-panel h3,
.order-board-table td strong,
.order-board-list-row strong {
  color: #0f172a;
}

.order-board-status p,
.order-board-workbar p,
.order-board-main-card span,
.order-board-empty,
.order-board-mini-note,
.order-board-table td small,
.order-board-metric span,
.order-board-list-row span,
.order-board-feed-row span,
.order-board-feed-row small,
.order-board-modal-desc {
  color: #64748b;
}

.order-board-shell {
  grid-template-columns:
    minmax(220px, clamp(240px, 17vw, 310px))
    minmax(520px, 1fr)
    minmax(280px, clamp(300px, 22vw, 360px));
  align-items: start;
}

.order-board-left,
.order-board-center,
.order-board-right {
  min-width: 0;
}

.order-board-section-title,
.order-board-side-panel h3 {
  color: #1d4ed8;
}

.order-board-main-card {
  border-color: #dbe4f0;
  background: #f8fafc;
  color: #0f172a;
}

.order-board-main-card.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.order-board-actions button,
.order-board-batch button,
.order-board-modal-actions button,
.order-board-table button {
  border-color: #bfdbfe;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.order-board-actions button.danger,
.order-board-modal-actions button:first-child {
  border-color: #fecaca;
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.14);
}

.order-board-actions button:disabled,
.order-board-batch button:disabled,
.order-board-table button:disabled {
  border-color: #dbe4f0;
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
}

.order-board-message {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.order-board-batch input,
.order-board-batch select,
.order-board-modal input,
.order-board-modal select,
.order-board-modal textarea {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.order-board-workbar {
  align-items: flex-start;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
}

.order-board-table-wrap {
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.order-board-table {
  min-width: 860px;
}

.order-board-table th {
  background: #f1f5f9;
  color: #2563eb;
}

.order-board-table th,
.order-board-table td,
.order-board-metric,
.order-board-list-row,
.order-board-feed-row {
  border-bottom-color: #e2e8f0;
}

.order-board-status-pill.open {
  color: #047857;
  background: #d1fae5;
}

.order-board-status-pill.closed {
  color: #b91c1c;
  background: #fee2e2;
}

.order-board-table .bid {
  color: #2563eb;
}

.order-board-table .ask {
  color: #dc2626;
}

.order-board-modal-backdrop {
  background: rgba(15, 23, 42, 0.28);
}

.order-board-modal label {
  color: #334155;
}

.order-board-center {
  grid-column: 2 / -1;
}

.order-board-account-dock {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.order-board-account-panel {
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.order-board-account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff, #f1f7ff);
  border-bottom: 1px solid #e2e8f0;
}

.order-board-account-summary div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
}

.order-board-account-summary strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.order-board-account-summary span {
  color: #64748b;
  font-size: 13px;
}

.order-board-account-tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f6f7fb;
}

.order-board-account-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-weight: 900;
}

.order-board-account-tabs button.active {
  color: #0f172a;
  border-bottom-color: #6d5dfc;
}

.order-board-account-tabs span {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.order-board-account-table-wrap {
  overflow: auto;
  max-height: 720px;
  background: #ffffff;
}

.order-board-account-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.order-board-account-table th,
.order-board-account-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

.order-board-account-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.order-board-account-table td strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
}

.order-board-account-table td small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}

.order-board-account-table .positive {
  color: #2563eb;
}

.order-board-account-table .negative {
  color: #ef4444;
}

.order-board-activity-list {
  display: grid;
  max-height: 720px;
  overflow: auto;
}

.order-board-activity-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.order-board-activity-row strong {
  display: block;
  color: #0f172a;
}

.order-board-activity-row span,
.order-board-activity-row time {
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1320px) {
  .order-board-shell {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  }

  .order-board-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 900px) {
  .positions-page:has(.order-board-page) {
    padding: 10px 10px 32px;
  }

  .order-board-page {
    width: 100%;
  }

  .order-board-status,
  .order-board-workbar {
    flex-direction: column;
  }

  .order-board-shell,
  .order-board-right,
  .order-board-modal-grid {
    grid-template-columns: 1fr;
  }

  .order-board-center,
  .order-board-account-dock {
    grid-column: 1 / -1;
  }

  .order-board-status {
    position: static;
  }
}

@media (max-width: 640px) {
  .order-board-status,
  .order-board-left,
  .order-board-center,
  .order-board-right,
  .order-board-side-panel {
    border-radius: 16px;
    padding: 12px;
  }

  .order-board-actions,
  .order-board-batch {
    width: 100%;
  }

  .order-board-actions button,
  .order-board-batch button,
  .order-board-batch input,
  .order-board-batch select {
    flex: 1 1 140px;
  }

  .order-board-table {
    min-width: 760px;
  }

  .order-board-account-summary {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .order-board-account-tabs {
    overflow-x: auto;
  }

  .order-board-account-tabs button {
    white-space: nowrap;
  }

  .order-board-account-table {
    min-width: 860px;
  }
}

.positions-header {
  margin-bottom: 28px;
}

.positions-header h1 {
  margin: 0;
  font-size: 26px;
  color: #f1f5f9;
  font-weight: 600;
}

.positions-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: #94a3b8;
}

.positions-query-card {
  padding: 22px 26px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.5);
  margin-bottom: 28px;
}

.positions-current-account-bar .positions-query-desc {
  margin-bottom: 12px;
}

.account-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.account-tab-btn:hover {
  background: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.8);
}

.account-tab-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.6);
  color: #a5b4fc;
}

.account-tab-key-icon {
  font-size: 12px;
  opacity: 0.9;
}

.account-tab-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.positions-list-current-account {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.positions-list-current-account strong {
  color: #e2e8f0;
}

.positions-query-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

.positions-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.positions-form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.positions-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.positions-input {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-size: 14px;
  max-width: 480px;
}

.positions-input::placeholder {
  color: #64748b;
}

.positions-input:focus {
  outline: none;
  border-color: rgba(148, 163, 184, 0.5);
}

.positions-input-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.positions-form-actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.positions-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
}

.positions-checkbox-label input {
  cursor: pointer;
}

.positions-telegram-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 4px;
}

.positions-query-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.positions-query-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.6);
  color: #c7d2fe;
}

.positions-query-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.positions-poll-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.positions-poll-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-size: 14px;
  max-width: 160px;
}

.positions-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.positions-tab {
  padding: 10px 20px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.positions-tab:hover {
  color: #e2e8f0;
}

.positions-tab.active {
  color: #a5b4fc;
  border-bottom-color: #a5b4fc;
}

.positions-orders-error {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  font-size: 14px;
  margin-bottom: 16px;
}

.orders-error-hint {
  color: #94a3b8;
  font-size: 12px;
  margin-left: 8px;
}

/* Open Orders：依市場分組 */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.orders-market-block {
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.3);
}

.orders-market-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.orders-market-title-actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.orders-market-title-actions .orders-market-question {
  flex: 1 1 180px;
  min-width: 0;
}

.orders-market-header-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  flex-shrink: 0;
}

.orders-market-toggle-label {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
}

.orders-market-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(51, 65, 85, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.orders-market-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.orders-market-icon-placeholder {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
}

.orders-market-question {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-boost-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.orders-boost-badge-clickable {
  cursor: pointer;
}

.orders-boost-badge-clickable:hover {
  filter: brightness(1.1);
}

.boost-orders-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.boost-market-card {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.boost-market-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.boost-market-question {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boost-orderbook-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.boost-orderbook-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boost-orderbook-title {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
}

.boost-orderbook-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.boost-orderbook-table th,
.boost-orderbook-table td {
  padding: 4px 8px;
  text-align: left;
}

.boost-orderbook-table thead th {
  color: #64748b;
  font-weight: 600;
}

.boost-ask-row td {
  color: #f87171;
}

.boost-bid-row td {
  color: #34d399;
}

.boost-empty {
  color: #64748b;
  font-style: italic;
}

.boost-orders-summary {
  font-size: 11px;
  color: #64748b;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
}

.orders-table-wrap {
  overflow-x: auto;
}

/* Predict / Polymarket 買一／賣一（掛單列表下方，上賣一下買一，左到右：標籤、價格、shares） */
.predict-best-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 10px 14px;
  margin: 0 12px 12px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.5);
}
.predict-best-col {
  flex: 1;
  min-width: 0;
}
.predict-best-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.predict-best-row .predict-best-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.predict-best-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.predict-best-tr {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  font-size: 13px;
}
.predict-best-td-label {
  min-width: 36px;
  font-weight: 500;
}
.predict-best-td-price {
  min-width: 48px;
  font-weight: 700;
  font-size: 14px;
}
.predict-best-td-shares {
  color: #e2e8f0;
}
.predict-best-ask .predict-best-td-label,
.predict-best-ask .predict-best-td-price { color: #f87171; }
.predict-best-bid .predict-best-td-label,
.predict-best-bid .predict-best-td-price { color: #60a5fa; }

.predict-best-status {
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.predict-best-status-safe {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.6);
}
.predict-best-status-danger {
  color: #f97373;
  border-color: rgba(248, 113, 113, 0.6);
}
.predict-best-status-balanced {
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.5);
}
.predict-best-force-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.predict-force-sep {
  margin: 0 2px;
  color: #64748b;
  font-size: 11px;
}
.predict-force-btn {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(100, 116, 139, 0.6);
  background: rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  cursor: pointer;
}
.predict-force-btn:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #e2e8f0;
}
.predict-force-btn.active {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.6);
  color: #4ade80;
}

.orders-status-floating {
  position: fixed;
  z-index: 40;
  max-width: 260px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
  font-size: 12px;
  cursor: move;
}

.orders-status-jump {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.orders-status-jump-btn {
  flex: 1;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 11px;
  cursor: pointer;
}

.orders-status-jump-btn:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
}

.orders-status-title {
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.orders-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.orders-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.orders-status-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  background: rgba(30, 41, 59, 0.8);
}

.orders-status-pill-safe {
  border-color: rgba(74, 222, 128, 0.6);
  color: #4ade80;
  background: rgba(22, 163, 74, 0.12);
}

.orders-status-pill-danger {
  border-color: rgba(248, 113, 113, 0.6);
  color: #f97373;
  background: rgba(185, 28, 28, 0.18);
}

.orders-status-pill-balanced {
  border-color: rgba(156, 163, 175, 0.6);
  color: #e5e7eb;
  background: rgba(55, 65, 81, 0.8);
}

.orders-status-pill-clickable {
  cursor: pointer;
}

.orders-status-pill-clickable:hover {
  filter: brightness(1.1);
}

.orders-status-outcome {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.orders-table th,
.orders-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.orders-table th {
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.orders-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.25);
}

.orders-cell-side {
  color: #e2e8f0;
  font-weight: 500;
}

.orders-cell-outcome {
  font-weight: 600;
}

.orders-cell-outcome.outcome-yes {
  color: #60a5fa;
}

.orders-cell-outcome.outcome-no {
  color: #f87171;
}

.orders-cell-price,
.orders-cell-shares,
.orders-cell-filled,
.orders-cell-value,
.orders-cell-expiry {
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
}

.orders-cell-value {
  color: #86efac;
  font-weight: 500;
}

.orders-cell-action {
  text-align: right;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 8px;
  min-width: 220px;
}

.orders-cell-action-col {
  min-width: 200px;
}

.orders-cancel-link {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(51, 65, 85, 0.5);
  color: #94a3b8;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.orders-replace-btn {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 6px;
  cursor: pointer;
  margin-right: 8px;
  white-space: nowrap;
}

.orders-replace-btn:hover {
  background: rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
}

.orders-replace-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.orders-remove-btn {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 6px;
  cursor: pointer;
  margin-right: 6px;
}

.orders-remove-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

.orders-remove-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.orders-cancel-link:hover {
  background: rgba(71, 85, 105, 0.6);
  color: #f87171;
}

/* 不在買一/賣一的掛單高亮 */
.orders-row-not-best {
  background: rgba(251, 191, 36, 0.15) !important;
}

.orders-row-not-best:hover {
  background: rgba(251, 191, 36, 0.25) !important;
}

/* 新掛單高亮（持續約 10 秒） */
.orders-row-new {
  background: rgba(34, 197, 94, 0.26) !important;
  transition: background 0.3s ease-out;
}

.orders-not-best-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f59e0b;
  color: #1e293b;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.positions-loading,
.positions-empty {
  padding: 40px;
  text-align: center;
  color: #94a3b8;
  font-size: 15px;
}

.positions-error {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.positions-retry-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(185, 28, 28, 0.3);
  color: #fecaca;
  font-size: 13px;
  cursor: pointer;
}

.positions-retry-btn:hover {
  background: rgba(185, 28, 28, 0.5);
}

.positions-account-card {
  padding: 22px 26px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.5);
  margin-bottom: 28px;
}

.positions-account-note-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 500;
}

/* 多帳戶管理樣式 */
.account-manager {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.account-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.account-manager-title {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.account-add-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.account-add-btn:hover {
  background: rgba(96, 165, 250, 0.2);
}

.account-add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.account-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-size: 13px;
}

.account-input::placeholder {
  color: #64748b;
}

.account-input-note {
  min-width: 120px;
  flex: 0.5;
}

.account-input-key {
  min-width: 200px;
}

.account-save-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.account-save-btn:hover:not(:disabled) {
  background: #2563eb;
}

.account-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.account-list-empty {
  padding: 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.account-item:hover {
  background: rgba(30, 41, 59, 0.7);
}

.account-item-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.account-item-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-item-address {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 13px;
  color: #e2e8f0;
  white-space: nowrap;
}

.account-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.account-item-note {
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-item-key-badge {
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.9;
}

.account-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.account-edit-key {
  font-size: 11px;
}

.account-edit-input {
  flex: 1;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 12px;
}

.account-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.account-alert-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
}

.account-alert-toggle input {
  cursor: pointer;
}

.account-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.account-action-btn:hover {
  background: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.account-action-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.positions-section-title {
  margin: 0 0 16px;
  font-size: 16px;
  color: #94a3b8;
  font-weight: 600;
}

.positions-account-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.positions-account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.positions-account-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.positions-account-name {
  font-size: 17px;
  color: #f1f5f9;
  font-weight: 500;
}

.positions-account-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #94a3b8;
}

.positions-account-points,
.positions-account-referral {
  font-size: 12px;
  color: #64748b;
}

.positions-list-section {
  position: relative;
  padding: 22px 26px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.5);
  margin-bottom: 28px;
}

.positions-list-section.positions-list-loading {
  pointer-events: none;
}

.positions-list-section.positions-list-loading .positions-tabs,
.positions-list-section.positions-list-loading .positions-section-title,
.positions-list-section.positions-list-loading .positions-cards-header,
.positions-list-section.positions-list-loading .positions-cards-list,
.positions-list-section.positions-list-loading .orders-list {
  opacity: 0.5;
}

.positions-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
  z-index: 10;
  border-radius: 12px;
}

.positions-loading-overlay span {
  color: var(--color-text-dim, #94a3b8);
  font-size: 14px;
}

.positions-list-section .positions-section-title {
  margin-bottom: 18px;
}

/* 官方風格：表頭列（Outcome, Shares, Value, To Win, Action） */
.positions-cards-header {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr auto;
  gap: 12px 16px;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  align-items: center;
}

.positions-ch-outcome { min-width: 72px; }
.positions-ch-shares { text-align: right; }
.positions-ch-value { text-align: right; }
.positions-ch-towin { text-align: right; }
.positions-ch-action { min-width: 100px; }

/* 持倉卡片列表 */
.positions-cards-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.position-card {
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  padding: 20px;
  transition: background 0.15s ease;
}

.position-card:hover {
  background: rgba(30, 41, 59, 0.25);
}

.position-card:last-child {
  border-bottom: none;
}

/* 市場標題區塊：圖示 + 問題 */
.position-card-market {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.position-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(51, 65, 85, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.position-card-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.position-card-icon-placeholder {
  font-size: 18px;
  font-weight: 600;
  color: #64748b;
}

.position-card-question {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 持倉明細：Outcome, Shares, Value, To Win, Sell */
.position-card-details {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr auto;
  gap: 12px 16px;
  align-items: center;
  font-size: 14px;
}

.position-outcome {
  font-weight: 600;
  min-width: 72px;
}

.outcome-yes {
  color: #60a5fa;
}

.outcome-no {
  color: #f87171;
}

.position-shares,
.position-value,
.position-towin {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
}

.position-value,
.position-towin {
  color: #86efac;
  font-weight: 500;
}

.position-return {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.return-amount {
  font-variant-numeric: tabular-nums;
}

.return-pct {
  font-size: 12px;
}

/* Return positive (green) / negative (red) */
.return-pos {
  color: #22c55e;
}
.return-neg {
  color: #f87171;
}

.position-sell-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(51, 65, 85, 0.5);
  color: #e2e8f0;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.position-sell-btn:hover {
  background: rgba(71, 85, 105, 0.7);
  border-color: rgba(148, 163, 184, 0.6);
  color: #f1f5f9;
}

@media (max-width: 768px) {
  .positions-cards-header {
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 11px;
  }
  .positions-ch-towin,
  .positions-ch-action {
    display: none;
  }
  .position-card-details {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px 12px;
  }
  .position-avg,
  .position-return,
  .position-towin {
    display: none;
  }
  .position-sell-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.positions-load-more {
  margin-top: 22px;
  text-align: center;
}

.positions-load-more-btn {
  min-width: 120px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
}

.positions-load-more-btn:hover:not(:disabled) {
  background: rgba(71, 85, 105, 0.7);
  border-color: rgba(148, 163, 184, 0.5);
}

.positions-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Polymarket 買一賣一（掛單下方） */
.polymarket-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.polymarket-section-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
}

.polymarket-loading {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
}

.polymarket-error,
.polymarket-empty {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.polymarket-error {
  color: #f87171;
}

.polymarket-market-block {
  margin-top: 16px;
}

.polymarket-market-block:first-of-type {
  margin-top: 0;
}

/* Polymarket 買一賣一（每個掛單市場區塊下方內嵌） */
.polymarket-inline {
  margin-top: 12px;
  margin-left: 0;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.polymarket-inline-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.polymarket-inline-orderbook {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .polymarket-inline-orderbook {
    grid-template-columns: 1fr;
  }
}

.polymarket-inline-table {
  margin: 0;
  font-size: 13px;
}

.polymarket-inline-table thead th {
  padding: 6px 10px 6px 0;
}

.polymarket-inline-table tbody td {
  padding: 4px 10px 4px 0;
}

.polymarket-inline-table .orders-cell-label {
  color: #94a3b8;
  font-size: 12px;
}

.polymarket-inline-loading {
  padding: 8px 0;
  font-size: 13px;
  color: #94a3b8;
}

.polymarket-inline-error {
  margin-top: 12px;
  padding: 12px;
  font-size: 13px;
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border-radius: 8px;
}

/* Polymarket 市場連結輸入（掛單區塊內，僅有掛單時顯示） */
.orders-poly-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.orders-poly-link-label {
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}

.orders-poly-link-input {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  font-size: 13px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: #e2e8f0;
}

.orders-poly-link-input::placeholder {
  color: #64748b;
}

.orders-poly-link-save {
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  color: #93c5fd;
  cursor: pointer;
}

.orders-poly-link-save:hover {
  background: rgba(59, 130, 246, 0.3);
}

.orders-poly-link-saved {
  font-size: 12px;
  color: #4ade80;
  margin-left: 4px;
}

.orders-poly-link-delete {
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 6px;
  color: #fca5a5;
  cursor: pointer;
}

.orders-poly-link-delete:hover {
  background: rgba(248, 113, 113, 0.25);
}

/* 與 Poly 比較的安全/危險標示 */
.orders-poly-status {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  margin-right: 8px;
}

.orders-poly-status-safe {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.orders-poly-status-danger {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.orders-auto-btn {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 4px;
  cursor: pointer;
  margin-right: 8px;
}

.orders-auto-btn:hover {
  background: rgba(167, 139, 250, 0.22);
}

.auto-trading-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auto-trading-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  color: #94a3b8;
}

.auto-trading-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.auto-trading-blacklist {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.main-page-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.main-page-tab {
  padding: 10px 20px;
  font-size: 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  cursor: pointer;
}

.main-page-tab:hover {
  color: #e2e8f0;
}

.main-page-tab.active {
  color: #a78bfa;
  border-bottom-color: #a78bfa;
}

.score-grinding-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.score-grinding-add-row input,
.score-grinding-add-row select {
  padding: 8px 10px;
  font-size: 13px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: #e2e8f0;
}

/* ─── 批量挂单工具 ─────────────────────────────────────────────────────────── */
.batch-order-root {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 12px 16px;
  gap: 12px;
}
.batch-toolbar-left { display: flex; align-items: center; gap: 12px; }
.batch-toolbar-right { display: flex; align-items: center; gap: 10px; }
.batch-title { font-size: 16px; font-weight: 700; color: #f1f5f9; }
.batch-addr { font-size: 12px; color: #64748b; font-family: monospace; }

.batch-global-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 10px 16px;
  flex-wrap: wrap;
}
.batch-label { font-size: 12px; color: #94a3b8; white-space: nowrap; }

.batch-btn {
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.batch-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.batch-btn-primary { background: #f0b90b; color: #0f172a; }
.batch-btn-primary:hover:not(:disabled) { opacity: 0.85; }
.batch-btn-secondary { background: #1e293b; color: #cbd5e1; border: 1px solid #334155; }
.batch-btn-secondary:hover:not(:disabled) { background: #273549; }
.batch-btn-xs { background: #1e293b; color: #94a3b8; border: 1px solid #334155; padding: 3px 9px; font-size: 12px; border-radius: 4px; }
.batch-btn-xs:hover:not(:disabled) { background: #273549; color: #e2e8f0; }

.batch-select {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 5px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 5px 8px;
  cursor: pointer;
}
.batch-select-sm { padding: 3px 6px; font-size: 12px; }

.batch-input {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 5px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 5px 8px;
}
.batch-input-sm { padding: 3px 6px; font-size: 12px; width: 80px; }
.batch-input:focus, .batch-select:focus { outline: none; border-color: #f0b90b; }

.batch-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  color: #fca5a5;
  font-size: 13px;
  padding: 8px 14px;
}

.batch-table-wrap {
  background: #0a0f1e;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow-x: auto;
}
.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.batch-table thead tr {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}
.batch-table th {
  padding: 10px 10px;
  text-align: left;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.batch-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #0f172a;
  color: #cbd5e1;
  vertical-align: middle;
}
.batch-table tbody tr:hover { background: rgba(30,41,59,0.5); }
.batch-row-selected td { background: rgba(240,185,11,0.04); }
.batch-cell-question { color: #e2e8f0; max-width: 260px; }

.batch-outcome { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.batch-outcome.outcome-yes { background: rgba(34,197,94,0.15); color: #22c55e; }
.batch-outcome.outcome-no  { background: rgba(239,68,68,0.15);  color: #ef4444; }

/* 日志面板 */
.batch-log-panel {
  background: #050a14;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
}
.batch-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.batch-log-body {
  max-height: 180px;
  overflow-y: auto;
  padding: 6px 14px;
  font-size: 12px;
  font-family: monospace;
}
.batch-log-line { display: flex; gap: 10px; padding: 2px 0; line-height: 1.5; }
.batch-log-time { color: #475569; white-space: nowrap; }
.batch-log-info  { color: #94a3b8; }
.batch-log-success { color: #22c55e; }
.batch-log-error { color: #ef4444; }
.batch-log-warn  { color: #f59e0b; }

/* 批量挂单补充样式 */
.batch-stat {
  font-size: 12px;
  color: #64748b;
  background: #1e293b;
  border-radius: 4px;
  padding: 2px 8px;
}
.batch-stat-active { color: #22c55e; background: rgba(34,197,94,0.1); }

.batch-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.batch-search-input { flex: 1; max-width: 360px; }

.batch-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
  transition: transform 0.1s;
}
.batch-star-btn:hover { transform: scale(1.2); }
.batch-star-btn.starred { filter: drop-shadow(0 0 3px #f59e0b); }

.batch-row-starred td { background: rgba(240,185,11,0.06) !important; }
.batch-row-starred:hover td { background: rgba(240,185,11,0.1) !important; }
