/* Layout glue so WT class names fill the Leptos shell without Tailwind. */

.desk-center {
  display: flex;
  min-height: 0;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.desk-body {
  min-height: 0;
  overflow: hidden;
}

.chain-root {
  display: flex;
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex-direction: column;
  overflow: hidden;
}

.chain-body {
  position: relative;
  min-height: 0;
  width: 100%;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chain-head-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
}

.chain-price {
  border: 0;
}

.desk-quote-strip {
  display: flex;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(150, 150, 170, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
}

.mode-tabs {
  position: relative;
  z-index: 40;
  display: flex;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--desk-border);
  background: var(--desk-bg);
  padding: 0 8px;
}

.mode-tabs-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--desk-text-muted);
}

.mode-tabs-seg {
  display: flex;
  overflow: hidden;
  border-radius: 4px;
}

.mode-tabs-seg .desk-btn {
  height: 28px;
  border-radius: 0;
  border-right-width: 0;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 700;
}

.mode-tabs-seg .desk-btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.mode-tabs-seg .desk-btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  border-right-width: 1px;
}

.mode-tabs-symbol {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--desk-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mode-tabs-px {
  margin-left: 8px;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mode-tabs-legs {
  margin-left: 8px;
  font-weight: 400;
  color: var(--desk-text-muted);
}

.mode-tabs-right {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.mode-tabs-hint {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--desk-text-muted);
}

.mode-strikes-root {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mode-strikes-root.is-open { z-index: 500; }

.mode-strikes-label {
  color: var(--desk-text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-strikes-trigger {
  height: 28px;
  min-width: 52px;
  justify-content: space-between;
  gap: 4px;
  padding: 0 8px;
  font-size: 11px;
  text-transform: none;
}

.mode-strikes-value { color: #fff; font-weight: 650; }

.mode-strikes-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--desk-text-soft);
  transition: transform 120ms ease;
}

.mode-strikes-root.is-open .mode-strikes-chevron { transform: rotate(180deg); }

.mode-strikes-backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  cursor: default;
}

.mode-strikes-menu {
  position: absolute;
  z-index: 2;
  top: calc(100% + 4px);
  right: 0;
  min-width: 88px;
  overflow: hidden;
  border: 1px solid var(--desk-border-soft);
  background: var(--desk-bg);
  padding: 2px 0;
  box-shadow: 0 12px 32px rgb(0 0 0 / 65%);
}

.mode-strikes-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--desk-text);
  cursor: pointer;
  padding: 6px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}

.mode-strikes-option:hover { background: var(--desk-row); }
.mode-strikes-option.is-selected { background: var(--desk-control); color: #fff; }
.mode-strikes-wings { color: var(--desk-text-muted); font-size: 10px; font-weight: 400; }

.pos-select-banner {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #3a3a3a;
  background: #242424;
  color: #ddd;
  padding: 5px 10px;
  font-size: 11px;
}

.pos-select-banner-count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e8e8e8;
  color: #1a1a1a;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pos-select-banner-copy { white-space: nowrap; }

.pos-select-banner-hint {
  margin-left: auto;
  color: #888;
  font-size: 10px;
  white-space: nowrap;
}

.pos-select-banner-clear {
  border: 1px solid #555;
  border-radius: 3px;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}

.pos-select-banner-clear:hover { background: rgb(255 255 255 / 8%); color: #fff; }

@media (max-width: 820px) {
  .pos-select-banner { flex-wrap: wrap; }
  .pos-select-banner-hint { order: 3; width: 100%; margin-left: 26px; }
}

.ticket-bar {
  display: flex;
  height: 158px;
  flex-shrink: 0;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid var(--desk-border);
}

.ticket-head {
  display: flex;
  height: 22px;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--desk-border);
  padding: 0 8px;
}

.ticket-head-left,
.ticket-head-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.ticket-head-right {
  flex-shrink: 0;
}

.ticket-trade-row {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  align-items: stretch;
}

.ticket-exec {
  display: flex;
  width: 196px;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border-left: 1px solid var(--desk-border);
  padding: 4px 10px;
}

.ticket-exec-row {
  display: flex;
  gap: 6px;
}

.ticket-field {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.ticket-stats {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  overflow: hidden;
}

.ticket-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.ticket-stat-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--desk-text-muted);
}

.ticket-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--desk-text);
  font-variant-numeric: tabular-nums;
}

.ticket-stat-value.up { color: var(--desk-up); }
.ticket-stat-value.down { color: var(--desk-down); }

.ticket-limit-col {
  display: flex;
  width: 220px;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.ticket-limit-box {
  display: flex;
  height: 36px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  background: #161616;
  overflow: hidden;
}

.ticket-limit-input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  padding: 0 8px;
}

.ticket-mkt-snaps {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.ticket-mkt-snap {
  border: 0;
  background: transparent;
  color: var(--desk-text-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.ticket-mkt-snap--bid { color: var(--chain-bid, var(--desk-bid)); }
.ticket-mkt-snap--ask { color: var(--chain-ask, var(--desk-ask)); }
.ticket-mkt-snap.is-active { color: #fff; }

.ticket-empty-hint {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--desk-text-muted);
}

.ticket-leg-qty-control {
  display: inline-flex;
  height: 22px;
  align-items: center;
  overflow: hidden;
  border-radius: 2px;
  background: #1c1c1c;
}

.ticket-leg-qty-control.is-buy { color: #69bd7b; }
.ticket-leg-qty-control.is-sell { color: #e05d63; }

.ticket-leg-qty-step,
.ticket-leg-remove {
  display: inline-flex;
  width: 18px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.ticket-leg-qty {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ticket-leg-tag {
  min-width: 32px;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.ticket-leg-tag.is-buy {
  background: rgba(105, 189, 123, 0.18);
  color: #69bd7b;
}

.ticket-leg-tag.is-sell {
  background: rgba(224, 93, 99, 0.18);
  color: #e05d63;
}

.activity-side {
  display: inline-flex;
  height: 18px;
  min-width: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.activity-side.is-buy {
  background: rgba(105, 189, 123, 0.15);
  color: #69bd7b;
}

.activity-side.is-sell {
  background: rgba(224, 93, 99, 0.15);
  color: #e05d63;
}

.settings-hub {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: var(--desk-bg);
}

.settings-tabs {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--desk-border);
  padding: 8px 12px 0;
}

.settings-tab {
  border: 0;
  border-radius: 4px 4px 0 0;
  background: transparent;
  color: var(--desk-text-muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.settings-tab:hover {
  color: var(--desk-text-soft);
}

.settings-tab.is-active {
  border: 1px solid var(--desk-border);
  border-bottom: 0;
  background: rgba(82, 227, 155, 0.1);
  color: var(--wt-text);
  box-shadow: inset 0 2px 0 0 var(--wt-accent);
}

.settings-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.settings-copy {
  max-width: 42rem;
  color: var(--desk-text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.settings-copy h2 {
  margin: 0 0 6px;
  color: var(--wt-text);
  font-size: 14px;
  font-weight: 650;
}

.settings-copy p {
  margin: 0 0 10px;
}

.strat-names {
  max-width: 48rem;
  color: var(--desk-text-soft);
  font-size: 13px;
}

.strat-names h2 {
  margin: 0 0 6px;
  color: var(--wt-text);
  font-size: 16px;
  font-weight: 650;
}

.strat-names > p {
  margin: 0 0 14px;
  font-size: 12px;
}

.strat-names-search {
  width: 100%;
  max-width: 48rem;
  margin-bottom: 18px;
}

.strat-names-section {
  margin: 0 0 20px;
}

.strat-names-section h3 {
  margin: 0 0 8px;
  color: var(--desk-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.strat-names-table-wrap {
  overflow: hidden;
  border: 1px solid var(--desk-border, #2a2a2a);
  border-radius: 4px;
}

.strat-names-table {
  width: 100%;
  border-collapse: collapse;
}

.strat-names-table th {
  padding: 8px 12px;
  background: var(--desk-panel, #14181b);
  color: var(--desk-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.strat-names-table td {
  padding: 6px 12px;
  border-top: 1px solid var(--desk-border, #2a2a2a);
}

.strat-names-canonical {
  color: var(--desk-text-soft);
  white-space: nowrap;
}

.strat-names-alias {
  width: 100%;
  background: transparent;
  border-color: transparent;
}

.strat-names-alias:hover,
.strat-names-alias:focus {
  border-color: var(--desk-border, #3a4248);
  background: var(--desk-bg, #0c1012);
}

.strat-names-reset {
  width: 112px;
  text-align: right;
}

.strat-names-reset-button {
  border: 0;
  background: transparent;
  color: var(--desk-text-muted);
  cursor: pointer;
  font-size: 11px;
}

.strat-names-reset-button:hover:not(:disabled) { color: var(--desk-text-soft); }
.strat-names-reset-button:disabled { opacity: 0.4; cursor: default; }

.rail-mod-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.rail-mod-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--desk-text);
  font-size: 12px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 220px;
  margin: 10px 0;
  font-size: 11px;
  color: var(--desk-text-muted);
}

.settings-watchlist {
  width: 100%;
  min-height: 88px;
  margin: 8px 0;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pos-working-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 2px;
  background: rgba(234, 179, 8, 0.16);
  color: #facc15;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chain-columns-modal {
  position: absolute;
  top: 42px;
  right: 12px;
  z-index: 80;
  width: 240px;
  border: 1px solid var(--desk-border);
  border-radius: 8px;
  background: var(--desk-panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 10px;
}

.chain-columns-modal h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--desk-text-muted);
}

.chain-columns-modal label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--desk-text);
  font-size: 12px;
}

.analysis-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  padding: 16px;
  color: var(--desk-text-soft);
  font-size: 12px;
}

.pos-filter-count {
  margin-left: 4px;
  color: var(--desk-text-muted);
  font-weight: 600;
}

.scan-page {
  height: 100%;
}

.scan-toolbar {
  flex-wrap: wrap;
}

.scan-body {
  display: flex;
  min-height: 0;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.scan-timer,
.scan-instant {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--desk-text-soft);
}

.scan-timer select {
  height: 26px;
}
