/* ArbiFlow dashboard: additions to the shared stylesheet (app.css).
   Only what the three kinds of record need. Colours come from app.css tokens. */

/* The three kinds, each with its own mark so they are never mistaken for one another. */
.kind-tag {
  display: inline-block;
  padding: 0 0.4375rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.375rem;
  white-space: nowrap;
  vertical-align: middle;
}

.kind-tag.kind-signal {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-2);
}

.kind-tag.kind-sim {
  background: var(--warn-soft);
  border-color: var(--warn-border);
  color: var(--warn);
}

.kind-tag.kind-live {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.stat.kind-signal {
  box-shadow: inset 0 3px 0 var(--border-strong);
}

.stat.kind-sim {
  box-shadow: inset 0 3px 0 var(--warn);
}

.stat.kind-live {
  box-shadow: inset 0 3px 0 var(--danger);
}

.stat-label .kind-tag {
  margin-inline-end: 0.375rem;
}

.kind-line {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  max-inline-size: 52rem;
  margin-block-end: 1.5rem;
  color: var(--text-2);
}

.kind-line .kind-tag {
  flex: none;
  margin-block-start: 0.1875rem;
}

/* The top bar says, always, that nothing real can be traded. */
.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.lock-pill::before {
  content: "";
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--text-3);
}

.block > h2 {
  margin-block-end: 0.75rem;
}

.block > .muted {
  max-inline-size: 52rem;
  margin-block-end: 0.875rem;
}

.block > .facts:first-child {
  margin-block-start: 0;
}

.status-tag.is-warn {
  background: var(--warn-soft);
  border-color: var(--warn-border);
  color: var(--warn);
}

.list td.note {
  min-inline-size: 15rem;
  color: var(--text-2);
  font-size: 0.875rem;
}

.list td.note strong {
  color: var(--text);
  font-weight: 600;
}

/* In a table a route stays on one line; the card scrolls sideways if it must. */
.list .route {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.list .when {
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* The orders of one paper trade, opened on request. */
details.orders {
  margin-block-start: 0.5rem;
}

details.orders > summary {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

details.orders > summary:hover {
  color: var(--accent-hover);
}

.orders-list {
  display: grid;
  gap: 0.375rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
}

.orders-list li {
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
}

.orders-list .order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.625rem;
  color: var(--text);
  font-weight: 600;
}

.orders-list .mono {
  direction: ltr;
  unicode-bidi: isolate;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

@media (max-width: 760px) {
  .lock-pill {
    font-size: 0.75rem;
  }

  /* A long value must not squeeze its label into a column one word wide. */
  .facts th {
    inline-size: 45%;
  }

  .facts td {
    overflow-wrap: anywhere;
  }

  .list td.note {
    display: block;
    min-inline-size: 0;
    padding-block-start: 0.375rem;
  }

  .list td.note::before {
    display: block;
  }
}

/* the Keys tab */
.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-block-start: 0.5rem;
}

.key-form {
  max-inline-size: 32rem;
}

.chip-button.is-danger {
  color: var(--danger, #b3261e);
}
