.spark {
  width: 160px;
  height: 28px;
}

.spark polyline {
  fill: none;
  stroke: #4c8dff;
  stroke-width: 2;
}

.trader {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.trader-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trader-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 50;
}

.modal {
  width: min(880px, 100%);
  background: rgba(20, 26, 35, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-title {
  font-weight: 700;
}

.modal-body {
  padding: 14px;
}

.modal-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 12px;
  align-items: center;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px 0;
}

.tab {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.tab.active {
  background: rgba(76, 141, 255, 0.2);
  border-color: rgba(76, 141, 255, 0.55);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: 16px;
  height: 16px;
}

.disclaimer-code {
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-height: 320px;
}

/* WinTerminal / ?embed=1 iframe: hide full-page chrome (setEmbedMode adds .embed on body) */
body.embed {
  min-height: 100%;
  height: 100%;
  overflow: auto;
}
body.embed .bg {
  display: none !important;
}
body.embed > header.topbar {
  display: none !important;
}
body.embed > main.container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 0 6px;
  box-sizing: border-box;
}
body.embed #boardPanel {
  border-radius: 0;
  border: none;
  box-shadow: none;
}
body.embed .auth-overlay {
  min-height: 180px;
}

/* —— Mobile card layout (same pattern as /copier/leaderboard/slave/) —— */
.slave-lb-cards {
  display: none;
  gap: 12px;
}

.slave-lb-cards .lb-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(0,0,0,0.12);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.slave-lb-cards .lb-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.slave-lb-cards .lb-card-name {
  font-weight: 750;
}

.slave-lb-cards .lb-card-login {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(232,237,248,0.78);
}

.slave-lb-cards .lb-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.slave-lb-cards .lb-k {
  font-size: 12px;
  color: rgba(232,237,248,0.72);
}

.slave-lb-cards .lb-v {
  font-family: var(--mono);
  font-weight: 650;
  font-size: 12px;
}

.slave-lb-cards .lb-details {
  margin-top: 0;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 10px 12px;
}

.slave-lb-cards .lb-details-title {
  font-weight: 750;
  margin-bottom: 8px;
}

.slave-lb-cards .lb-details-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.slave-lb-cards .lb-details-k {
  font-size: 12px;
  color: rgba(232,237,248,0.72);
}

.slave-lb-cards .lb-details-v {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
}

.slave-follower-cards {
  display: none;
  gap: 12px;
}

.slave-follower-cards .slave-follower-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(0,0,0,0.12);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.slave-follower-cards .slave-follower-card .lb-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.slave-follower-cards .slave-follower-card .lb-card-name {
  font-family: var(--mono);
  font-weight: 750;
  font-size: 14px;
}

.slave-follower-cards .lb-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.slave-follower-cards .lb-k {
  font-size: 12px;
  color: rgba(232,237,248,0.72);
}

.slave-follower-cards .lb-v {
  font-family: var(--mono);
  font-weight: 650;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.pill.ok {
  border-color: rgba(46, 229, 157, 0.45);
  color: rgba(46, 229, 157, 0.95);
}

@media (max-width: 760px) {
  .statusbar {
    display: none !important;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
  }

  .top-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .top-actions .btn {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
  }

  #boardPanel .tabs {
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px 0;
  }

  #boardPanel .tab {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
    text-align: center;
    padding: 10px 8px;
    font-size: 13px;
    border-radius: 12px;
  }

  #boardPanel .slave-lb-table-wrap,
  #boardPanel .slave-followers-table-wrap {
    display: none !important;
  }

  #boardPanel .slave-lb-cards,
  #boardPanel .slave-follower-cards {
    display: grid !important;
  }

  .slave-lb-cards .lb-details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .container {
    width: calc(100vw - 16px);
    margin: 12px auto 28px;
  }

  #boardPanel.panel {
    padding: 12px;
  }

  #boardPanel .spark {
    width: 120px;
    height: 24px;
  }
}
