:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-raised: #0b0d10;
  --surface: #0f1114;
  --surface-2: #14171c;
  --surface-3: #1a1e24;
  --control: #0a0c0f;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.045);
  --text: #f3f0e9;
  --text-2: #b4b0a7;
  --text-3: #84817a;
  --text-4: #595752;
  --ember: #ff6a2a;
  --ember-bright: #ff8a4c;
  --ember-soft: rgba(255, 106, 42, 0.12);
  --ember-line: rgba(255, 106, 42, 0.28);
  --ember-2: #ffbd73;
  --long: #3ddc97;
  --long-soft: rgba(61, 220, 151, 0.11);
  --long-line: rgba(61, 220, 151, 0.26);
  --short: #ff5c7c;
  --short-soft: rgba(255, 92, 124, 0.1);
  --short-line: rgba(255, 92, 124, 0.26);
  --warn: #f2c45e;
  --warn-soft: rgba(242, 196, 94, 0.1);
  --info: #8fb5ff;
  --info-soft: rgba(143, 181, 255, 0.1);
  --radius-s: 7px;
  --radius-m: 11px;
  --radius-l: 16px;
  --font-ui: "Onest", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
  --shadow-pop: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --rail: 224px;
  --topbar: 58px;
}

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

html {
  min-height: 100%;
  background: var(--bg);
  scrollbar-color: #2c3037 transparent;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 18% -12%, rgba(255, 106, 42, 0.055), transparent 70%),
    radial-gradient(700px 460px at 100% 0%, rgba(255, 189, 115, 0.025), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(255, 106, 42, 0.32);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

[hidden] {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.pos {
  color: var(--long) !important;
}

.neg {
  color: var(--short) !important;
}

.muted {
  color: var(--text-3);
}

.dim {
  color: var(--text-4);
}

.warn {
  color: var(--warn);
}

.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
}

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

.nowrap {
  white-space: nowrap;
}

.right {
  text-align: right;
}

.grow {
  flex: 1;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 13px 14px;
  background: #090a0c;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  padding: 2px 9px 22px;
}

.brand-word {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.05;
}

.brand-word small {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-4);
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 0 12px 8px;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-4);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(255, 106, 42, 0.13), rgba(255, 106, 42, 0.025));
  box-shadow: inset 0 0 0 1px rgba(255, 106, 42, 0.13);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 2px;
  background: var(--ember);
  box-shadow: 0 0 10px rgba(255, 106, 42, 0.6);
}

.nav-item.active svg {
  color: var(--ember);
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.rail-spacer {
  flex: 1;
}

.rail-card {
  margin: 16px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 106, 42, 0.07), transparent 55%),
    var(--surface);
}

.rail-card .eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rail-card .live-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--long);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.1);
}

.rail-equity {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.rail-pnl {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-4);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 7px;
  border-radius: 9px;
}

.user-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

.avatar {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #2a2019, #17120f);
  border: 1px solid rgba(255, 138, 76, 0.22);
  color: var(--ember-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}

.user-mail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
  font-size: 10px;
  color: var(--text-4);
}

.user-exit {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-4);
}

.user-exit:hover {
  color: var(--short);
  background: var(--short-soft);
}

.user-exit svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(14px);
}

.rail-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
}

.rail-toggle svg {
  width: 16px;
  height: 16px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.breadcrumb .crumb-tag {
  padding: 2px 6px;
  border: 1px solid var(--ember-line);
  border-radius: 4px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.11em;
}

.breadcrumb .crumb-sep {
  color: var(--text-4);
}

.breadcrumb strong {
  color: var(--text-2);
  font-weight: 500;
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.market-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.market-pill .pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--long);
}

.market-pill .pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(61, 220, 151, 0.3);
  animation: pulse-ring 2.4s var(--ease) infinite;
}

.market-pill.offline .pulse {
  background: var(--warn);
}

.market-pill.offline .pulse::after {
  border-color: rgba(242, 196, 94, 0.3);
}

.top-price {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}

.top-price strong {
  color: var(--text-2);
  font-weight: 500;
}

.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
}

.icon-btn:hover,
.icon-btn.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 2px var(--bg);
}

.content {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 22px 26px 64px;
}

.page-terminal .content {
  padding-top: 14px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
}

.page-kicker .flame {
  color: var(--ember);
}

.page-title {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.page-sub {
  max-width: 620px;
  font-size: 12.5px;
  color: var(--text-3);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
}

.btn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  border-color: rgba(255, 160, 100, 0.55);
  background: linear-gradient(180deg, #ff8348, #f05b1b);
  color: #180b04;
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 10px 26px rgba(255, 90, 26, 0.17);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ff925d, #f76a2a);
  color: #180b04;
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.btn-soft {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text-2);
}

.btn-danger {
  border-color: var(--short-line);
  background: var(--short-soft);
  color: var(--short);
}

.btn-danger:hover {
  background: rgba(255, 92, 124, 0.16);
  color: #ff8aa2;
}

.btn-long {
  border-color: var(--long-line);
  background: var(--long-soft);
  color: var(--long);
}

.btn-long:hover {
  background: rgba(61, 220, 151, 0.16);
}

.btn-short {
  border-color: var(--short-line);
  background: var(--short-soft);
  color: var(--short);
}

.btn-short:hover {
  background: rgba(255, 92, 124, 0.16);
}

.btn-sm {
  height: 29px;
  padding: 0 9px;
  font-size: 11.5px;
  border-radius: 6px;
}

.btn-sm svg {
  width: 13px;
  height: 13px;
}

.btn-lg {
  height: 42px;
  padding: 0 18px;
  font-size: 13.5px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 90px), var(--surface);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.panel-head {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.panel-head-wrap {
  flex-wrap: wrap;
  padding-top: 9px;
  padding-bottom: 9px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.panel-title .tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--text-4);
  letter-spacing: 0.06em;
}

.panel-body {
  padding: 15px;
}

.panel-body-tight {
  padding: 9px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.tab {
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-4);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

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

.tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.tab .count {
  margin-left: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  gap: 2px;
}

.segmented button,
.segmented a {
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-4);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.segmented button:hover,
.segmented a:hover {
  color: var(--text-2);
}

.segmented button.active,
.segmented a.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 8px rgba(0, 0, 0, 0.25);
}

.segmented.seg-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 3px;
}

.segmented.seg-side button {
  height: 34px;
  font-size: 12px;
  font-weight: 600;
}

.segmented.seg-side button[data-side="buy"].active {
  background: var(--long-soft);
  color: var(--long);
  box-shadow: inset 0 0 0 1px var(--long-line);
}

.segmented.seg-side button[data-side="sell"].active {
  background: var(--short-soft);
  color: var(--short);
  box-shadow: inset 0 0 0 1px var(--short-line);
}

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

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--text-4);
}

.field-label .hint {
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-4);
}

.field-help {
  font-size: 10.5px;
  color: var(--text-4);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 37px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: var(--control);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}

.textarea {
  height: auto;
  min-height: 84px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.5;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-4);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--line-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(255, 106, 42, 0.5);
  box-shadow: 0 0 0 3px var(--ember-soft);
  background: #0c0e11;
}

.input.invalid {
  border-color: var(--short-line);
  box-shadow: 0 0 0 3px var(--short-soft);
}

.select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-4) 50%),
    linear-gradient(135deg, var(--text-4) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 11px) 16px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input {
  padding-right: 52px;
}

.input-suffix {
  position: absolute;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-4);
  pointer-events: none;
}

.quick-pcts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.pct-btn {
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--text-4);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.pct-btn:hover {
  color: var(--text-2);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
}

.check input {
  appearance: none;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--control);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.check input::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 1.6px solid #160a04;
  border-bottom: 1.6px solid #160a04;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.12s;
}

.check input:checked {
  border-color: var(--ember);
  background: var(--ember);
}

.check input:checked::after {
  transform: rotate(-45deg) scale(1);
}

.range {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ember) 0%, var(--ember) var(--range, 40%), #23272e var(--range, 40%));
  outline: none;
}

.range::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border: 2px solid #1a0f08;
  border-radius: 50%;
  background: var(--ember-bright);
  box-shadow: 0 0 0 4px rgba(255, 106, 42, 0.12);
  cursor: pointer;
}

.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #1a0f08;
  border-radius: 50%;
  background: var(--ember-bright);
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-long {
  border-color: var(--long-line);
  background: var(--long-soft);
  color: var(--long);
}

.badge-short {
  border-color: var(--short-line);
  background: var(--short-soft);
  color: var(--short);
}

.badge-ember {
  border-color: var(--ember-line);
  background: var(--ember-soft);
  color: var(--ember-2);
}

.badge-warn {
  border-color: rgba(242, 196, 94, 0.3);
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-info {
  border-color: rgba(143, 181, 255, 0.26);
  background: var(--info-soft);
  color: var(--info);
}

.badge-ghost {
  background: transparent;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-4);
}

.status.running {
  color: var(--long);
}

.status.running .dot {
  background: var(--long);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.1);
}

.status.paused {
  color: var(--warn);
}

.status.paused .dot {
  background: var(--warn);
}

.status.stopped {
  color: var(--text-4);
}

.status.error {
  color: var(--short);
}

.status.error .dot {
  background: var(--short);
}

.divider-v {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  scrollbar-width: thin;
}

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

.data th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-4);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.data td {
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
}

.data tbody tr {
  transition: background 0.1s;
}

.data tbody tr:hover td {
  background: rgba(255, 255, 255, 0.022);
}

.data tbody tr:last-child td {
  border-bottom: 0;
}

.data .num,
.data th.num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.data .sym {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  font-size: 11.5px;
}

.data .actions {
  text-align: right;
}

.data .sub {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--text-4);
}

.data-scroll {
  max-height: 320px;
  overflow: auto;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 42px 20px;
  text-align: center;
}

.empty-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-4);
  margin-bottom: 2px;
}

.empty-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.empty-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}

.empty-text {
  max-width: 340px;
  font-size: 11.5px;
  color: var(--text-4);
}

.empty .btn {
  margin-top: 6px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: #171a1f;
  color: transparent !important;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: shimmer 1.4s infinite;
}

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ember);
  border-radius: 9px;
  background: #15181d;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: toast-in 0.22s var(--ease);
}

.toast.success {
  border-left-color: var(--long);
}

.toast.error {
  border-left-color: var(--short);
}

.toast.warn {
  border-left-color: var(--warn);
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--ember);
}

.toast.success .toast-icon {
  color: var(--long);
}

.toast.error .toast-icon {
  color: var(--short);
}

.toast.warn .toast-icon {
  color: var(--warn);
}

.toast-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.toast-body {
  min-width: 0;
  flex: 1;
}

.toast-title {
  font-size: 12px;
  font-weight: 600;
}

.toast-text {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-3);
  word-break: break-word;
}

.toast-close {
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  color: var(--text-4);
  padding: 0;
}

.toast-close:hover {
  color: var(--text);
}

.toast-close svg {
  width: 12px;
  height: 12px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 4, 6, 0.7);
  backdrop-filter: blur(3px);
  animation: fade-in 0.16s ease;
}

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #101317;
  box-shadow: var(--shadow-pop);
  animation: modal-in 0.2s var(--ease);
}

.modal-head {
  padding: 18px 20px 12px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-text {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-3);
}

.modal-body {
  padding: 6px 20px 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

.secret-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 106, 42, 0.35);
  border-radius: 8px;
  background: var(--ember-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ember-2);
  word-break: break-all;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  z-index: 0;
}

.drawer-panel {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background: #0d0f13;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5);
  animation: drawer-in 0.24s var(--ease);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 18px 22px 24px;
}

.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(13, 15, 19, 0.92);
}

.drawer-close {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text-3);
}

.drawer-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.drawer-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.form-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
}

.form-section-title .step {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ember-line);
  border-radius: 50%;
  background: var(--ember-soft);
  color: var(--ember-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.tpl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  text-align: left;
  transition: border-color 0.14s, background 0.14s;
}

.tpl-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.tpl-card.active {
  border-color: var(--ember-line);
  background: linear-gradient(150deg, rgba(255, 106, 42, 0.11), rgba(255, 106, 42, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 106, 42, 0.12);
}

.tpl-glyph {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ember-2);
}

.tpl-name {
  font-size: 12px;
  font-weight: 600;
}

.tpl-desc {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tpl-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 13px;
  height: 13px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--ember);
  color: #180b04;
  font-size: 8px;
  font-weight: 700;
}

.tpl-card.active .tpl-check {
  display: grid;
}

.summary-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 11.5px;
  color: var(--text-3);
}

.summary-row strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-2);
}

.notice {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}

.notice svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  fill: none;
  stroke: var(--ember);
  stroke-width: 1.7;
}

.notice.warn {
  border-color: rgba(242, 196, 94, 0.2);
  background: var(--warn-soft);
}

.notice.warn svg {
  stroke: var(--warn);
}

.notice strong {
  color: var(--text-2);
}

.tape {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  scrollbar-width: none;
}

.tape::-webkit-scrollbar {
  display: none;
}

.tape-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 132px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: var(--text-3);
}

.tape-item:hover {
  background: var(--surface-2);
}

.tape-item.active {
  border-color: var(--line);
  background: var(--surface-3);
}

.tape-sym {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.tape-price {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text);
}

.tape-chg {
  min-width: 38px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
}

.instrument {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  flex-wrap: wrap;
  padding: 0 2px 13px;
}

.instrument-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.instrument-symbol {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.instrument-symbol span {
  color: var(--text-4);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
}

.instrument-price {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.instrument-chg {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.instrument-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding-bottom: 3px;
}

.meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-cell .eyebrow {
  font-size: 8.5px;
}

.meta-cell strong {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-2);
}

.instrument-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 2px;
}

.account-select {
  height: 31px;
  max-width: 190px;
  font-size: 10.5px;
  border-radius: 7px;
}

.wallet-switch {
  position: relative;
}

.wallet-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  min-width: 200px;
  padding: 0 10px 0 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
}

.wallet-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.wallet-btn[aria-expanded="true"] {
  border-color: var(--ember-line);
  box-shadow: 0 0 0 3px var(--ember-soft);
}

.wallet-glyph {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ember-line);
  border-radius: 7px;
  background: var(--ember-soft);
  color: var(--ember-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.wallet-glyph.sm {
  width: 22px;
  height: 22px;
  border-color: var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-3);
  font-size: 9px;
}

.wallet-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.wallet-name {
  max-width: 132px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-balance {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-4);
}

.wallet-chevron {
  width: 12px;
  height: 12px;
  margin-left: auto;
  fill: none;
  stroke: var(--text-4);
  stroke-width: 1.8;
  transition: transform 0.16s ease;
}

.wallet-btn[aria-expanded="true"] .wallet-chevron {
  transform: rotate(180deg);
}

.wallet-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: 300px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #12151a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.wallet-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 5px 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
}

.wallet-create {
  height: 24px;
  padding: 0 8px;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
}

.wallet-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1px;
  border-radius: 8px;
}

.wallet-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.wallet-item.active {
  background: var(--ember-soft);
  box-shadow: inset 0 0 0 1px var(--ember-line);
}

.wallet-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
}

.wallet-pick:hover {
  color: var(--text);
}

.wallet-item-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.wallet-item-name {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-item-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.wallet-item.active .wallet-glyph.sm {
  border-color: var(--ember-line);
  background: rgba(255, 106, 42, 0.16);
  color: var(--ember-2);
}

.wallet-check {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--ember);
}

.wallet-check svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.wallet-item-actions {
  display: flex;
  opacity: 0;
  transition: opacity 0.12s;
}

.wallet-item:hover .wallet-item-actions,
.wallet-item.active .wallet-item-actions {
  opacity: 1;
}

.wallet-item-actions .icon-action {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.wallet-item-actions .icon-action svg {
  width: 12px;
  height: 12px;
}

.wallet-menu-foot {
  margin-top: 4px;
  padding: 8px 6px 2px;
  border-top: 1px solid var(--line-soft);
  font-size: 9px;
  line-height: 1.45;
  color: var(--text-4);
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px 318px;
  gap: 11px;
  align-items: start;
}

.chart-panel .chart-shell {
  position: relative;
  height: 430px;
}

.chart-panel .chart {
  position: absolute;
  inset: 0;
}

.chart-position {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 12, 15, 0.82);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.chart-position-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chart-position-pnl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chart-position-roe {
  font-size: 9px;
  color: var(--text-3);
}

.chart-position-levels {
  display: flex;
  gap: 9px;
  font-size: 9px;
  color: var(--text-4);
  white-space: nowrap;
}

.chart-position-levels .lvl b {
  font-weight: 500;
  color: var(--text-2);
}

.chart-position-levels .lvl.tp b {
  color: var(--long);
}

.chart-position-levels .lvl.sl b {
  color: var(--short);
}

.chart-position-levels .lvl.liq b {
  color: #f2c14e;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-legend {
  display: flex;
  gap: 10px;
  padding: 0 15px 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-4);
}

.legend-dot.up {
  background: var(--long);
}

.legend-dot.down {
  background: var(--short);
}

.terminal-side {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.book-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 7px 12px 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
}

.book-head span:last-child {
  text-align: right;
}

.book {
  position: relative;
  padding: 0 0 3px;
}

.book-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 1.5px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  cursor: default;
}

.book-row span {
  position: relative;
  z-index: 1;
}

.book-row span:last-child {
  text-align: right;
  color: var(--text-3);
}

.book-row .depth {
  position: absolute;
  top: 1px;
  bottom: 1px;
  right: 0;
  width: 0;
  background: var(--short-soft);
}

.book-row.bid .depth {
  background: var(--long-soft);
}

.book-row.ask span:first-child {
  color: var(--short);
}

.book-row.bid span:first-child {
  color: var(--long);
}

.book-row:hover span {
  color: var(--text);
}

.book-spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 3px 0;
  padding: 6px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.book-spread strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.book-spread span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.book-imbalance {
  display: flex;
  height: 3px;
  margin: 7px 12px 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
}

.book-imbalance .bid-bar {
  background: var(--long);
  opacity: 0.55;
}

.book-imbalance .ask-bar {
  background: var(--short);
  opacity: 0.55;
}

.tape-trades {
  max-height: 166px;
  overflow: hidden;
}

.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 6px;
  padding: 2.5px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}

.trade-row .price {
  color: var(--long);
}

.trade-row .price.sell {
  color: var(--short);
}

.trade-row span:last-child {
  text-align: right;
  color: var(--text-4);
}

.ticket {
  position: sticky;
  top: calc(var(--topbar) + 12px);
}

.ticket-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ticket-avail {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-4);
}

.ticket-avail strong {
  font-weight: 500;
  color: var(--text-3);
}

.ticket-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
}

.ticket-summary .summary-row {
  padding: 1px 0;
  font-size: 10.5px;
}

.ticket-note {
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--text-4);
  text-align: center;
}

.leverage-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leverage-row .range {
  flex: 1;
}

.leverage-value {
  min-width: 38px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ember-2);
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-foot {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.unit-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control);
}

.unit-toggle button {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-4);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.unit-toggle button:hover {
  color: var(--text-2);
}

.unit-toggle button.active {
  background: var(--surface-3);
  color: var(--ember-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.type-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.type-tabs.spot-mode {
  grid-template-columns: 1fr 1fr;
}

.type-tabs .tab {
  height: 27px;
  padding: 0 3px;
  border-radius: 6px;
  font-size: 10px;
}

.type-tabs .tab.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.055) inset;
}

.lev-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

.lev-presets button {
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--text-4);
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
}

.lev-presets button:hover {
  color: var(--text-2);
  border-color: var(--line-strong);
}

.lev-presets button.active {
  border-color: var(--ember-line);
  background: var(--ember-soft);
  color: var(--ember-2);
}

.protection-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.protection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
  user-select: none;
}

.protection-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--text-2);
}

.protection-title input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--ember);
}

.protection-head .hint {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.protection-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px 10px;
  border-top: 1px solid var(--line-soft);
}

.protection-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prot-tag {
  flex: none;
  width: 26px;
  padding: 4px 0;
  border-radius: 4px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.prot-tag.tp {
  border: 1px solid var(--long-line);
  background: var(--long-soft);
  color: var(--long);
}

.prot-tag.sl {
  border: 1px solid var(--short-line);
  background: var(--short-soft);
  color: var(--short);
}

.mini-select {
  height: 30px;
  padding: 0 18px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  appearance: none;
  background-color: var(--control);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-4) 50%),
    linear-gradient(135deg, var(--text-4) 50%, transparent 50%);
  background-position: calc(100% - 11px) 12px, calc(100% - 7px) 12px;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  cursor: pointer;
}

.mini-select:focus {
  outline: none;
  border-color: var(--ember-line);
  box-shadow: 0 0 0 2px var(--ember-soft);
}

.input.mini {
  height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.protection-preview {
  min-height: 12px;
  padding-left: 32px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.protection-preview strong {
  color: var(--text-2);
  font-weight: 500;
}

.protection-preview.warn,
.protection-preview.warn strong {
  color: var(--short);
}

.prot-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.prot-cell .tp {
  color: var(--long);
}

.prot-cell .sl {
  color: var(--short);
}

.prot-cell.none {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--text-4);
}

.table-btn {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--text-3);
  font-size: 10px;
  cursor: pointer;
}

.table-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  color: var(--text);
}

.table-btn.danger:hover {
  border-color: var(--short-line);
  background: var(--short-soft);
  color: var(--short);
}

.prot-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.submit-order {
  height: 42px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.submit-order.buy {
  border-color: rgba(61, 220, 151, 0.45);
  background: linear-gradient(180deg, #49e4a4, #28bd7f);
  color: #04130c;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.24) inset, 0 9px 24px rgba(40, 189, 127, 0.14);
}

.submit-order.sell {
  border-color: rgba(255, 92, 124, 0.42);
  background: linear-gradient(180deg, #ff708c, #e84263);
  color: #1a0509;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 9px 24px rgba(232, 66, 99, 0.14);
}

.blotter {
  margin-top: 12px;
}

.blotter .panel-head {
  min-height: 46px;
}

.blotter-body {
  min-height: 168px;
}

.blotter-empty {
  padding: 34px 16px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  overflow: hidden;
}

.metric-cell {
  position: relative;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.metric-cell:last-child {
  border-right: 0;
}

.metric-cell .eyebrow {
  font-size: 8.5px;
}

.metric-value {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.metric-sub {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--text-4);
}

.hero-equity {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background:
    radial-gradient(80% 160% at 0% 0%, rgba(255, 106, 42, 0.09), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    var(--surface);
  overflow: hidden;
}

.hero-equity::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  border: 1px solid rgba(255, 106, 42, 0.09);
  box-shadow: 0 0 0 40px rgba(255, 106, 42, 0.025), 0 0 0 90px rgba(255, 106, 42, 0.012);
  pointer-events: none;
}

.hero-left {
  position: relative;
  z-index: 1;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
}

.hero-number {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-number small {
  margin-left: 7px;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text-4);
}

.hero-delta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.hero-chart {
  position: relative;
  z-index: 1;
  min-height: 112px;
  align-self: stretch;
}

.hero-chart-box {
  position: absolute;
  inset: 0;
}

.hero-foot {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  margin: 2px -24px -22px;
  background: var(--line);
}

.hero-cell {
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.008), transparent), var(--surface);
}

.hero-cell .eyebrow {
  font-size: 8px;
}

.hero-cell strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

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

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

.stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 12px;
  margin-top: 12px;
}

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

.chart-box {
  position: relative;
  height: 280px;
}

.chart-box.tall {
  height: 330px;
}

.chart-box .chart {
  position: absolute;
  inset: 0;
}

.bd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 15px;
}

.bd-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 84px;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}

.bd-key {
  font-family: var(--font-mono);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.bd-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  background: var(--long);
}

.bd-fill.neg {
  background: var(--short);
}

.bd-val {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
}

.bd-meta {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--text-4);
}

.bots-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 12px;
  align-items: start;
}

.bot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) 0.8fr 0.65fr 0.65fr 0.65fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent), var(--surface);
  transition: border-color 0.14s, background 0.14s;
}

.bot-row:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.bot-row.running::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 2px;
  background: var(--long);
  box-shadow: 0 0 10px rgba(61, 220, 151, 0.4);
}

.bot-id {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.bot-glyph {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ember-2);
  letter-spacing: 0.04em;
}

.bot-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
}

.bot-mobile-status {
  display: none;
}

.bot-cell {
  min-width: 0;
}

.bot-cell .eyebrow {
  font-size: 8px;
}

.bot-cell strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-4);
}

.icon-action:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-3);
}

.icon-action.danger:hover {
  color: var(--short);
  border-color: var(--short-line);
  background: var(--short-soft);
}

.icon-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aside-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.aside-card + .aside-card {
  margin-top: 10px;
}

.aside-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.aside-title svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--ember);
  stroke-width: 1.7;
}

.aside-copy {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-3);
}

.fact-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: var(--text-4);
}

.fact strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-2);
}

.bot-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.bot-hero-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bot-hero-glyph {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--ember-line);
  border-radius: 11px;
  background: linear-gradient(150deg, rgba(255, 106, 42, 0.14), rgba(255, 106, 42, 0.02));
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ember-2);
  letter-spacing: 0.05em;
}

.bot-hero-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.bot-hero-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-4);
}

.bot-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.kv-list {
  display: flex;
  flex-direction: column;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv span {
  color: var(--text-4);
}

.kv strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-2);
  text-align: right;
}

.param-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.param-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--control);
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-3);
}

.param-chip b {
  color: var(--text-2);
  font-weight: 500;
}

.signal-list {
  max-height: 330px;
  overflow: auto;
}

.signal {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.signal:last-child {
  border-bottom: 0;
}

.signal-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-4);
  padding-top: 3px;
}

.signal-body {
  min-width: 0;
}

.signal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
}

.signal-reason {
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-price {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-3);
  padding-top: 3px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: calc(var(--topbar) + 18px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-toc .eyebrow {
  padding: 0 10px 8px;
}

.docs-toc a {
  padding: 7px 10px;
  border-left: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-3);
}

.docs-toc a:hover {
  color: var(--text);
  border-left-color: var(--ember);
}

.docs-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1000px;
}

.doc-section {
  scroll-margin-top: calc(var(--topbar) + 20px);
}

.doc-section h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.doc-section h3 {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
}

.doc-section p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
}

.doc-section p code,
.doc-section li code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--control);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ember-2);
}

.doc-section ul {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.doc-section li {
  position: relative;
  padding-left: 15px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-3);
}

.doc-section li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ember);
}

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
}

.method {
  width: 48px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 3px 0;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-2);
}

.method.get {
  background: rgba(143, 181, 255, 0.1);
  color: var(--info);
}

.method.post {
  background: var(--long-soft);
  color: var(--long);
}

.method.delete {
  background: var(--short-soft);
  color: var(--short);
}

.method.patch {
  background: var(--ember-soft);
  color: var(--ember-2);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.endpoint-desc {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-4);
  text-align: right;
}

.code-block {
  position: relative;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b0e;
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.code-tabs {
  display: flex;
  gap: 2px;
}

.code-tab {
  padding: 3px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-4);
  font-family: var(--font-mono);
  font-size: 9px;
}

.code-tab.active {
  background: var(--surface-3);
  color: var(--text-2);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 23px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--text-4);
  font-size: 9.5px;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.copy-btn svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.code-block pre {
  margin: 0;
  padding: 13px 14px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.65;
  color: #c9c5bc;
  tab-size: 2;
}

.code-block pre .c {
  color: #66645f;
}

.code-block pre .s {
  color: #e6b07a;
}

.code-block pre .k {
  color: #ff8a4c;
}

.keys-table td:first-child {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-2);
}

.link-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px dashed var(--ember-line);
  border-radius: 7px;
  background: var(--ember-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ember-2);
  letter-spacing: 0.05em;
}

.link-code button {
  border: 0;
  background: transparent;
  color: var(--text-3);
  padding: 0;
  display: grid;
  place-items: center;
}

.link-code button:hover {
  color: var(--text);
}

.link-code svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.admin-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  font-size: 11px;
  color: var(--text-3);
}

.admin-tool:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.export-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-3);
}

.export-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.export-link span:last-child {
  color: var(--text-4);
}

.notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(350px, calc(100vw - 36px));
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #101317;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.notify-head strong {
  font-size: 12px;
}

.notify-list {
  max-height: 360px;
  overflow: auto;
}

.notify-item {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.notify-item:last-child {
  border-bottom: 0;
}

.notify-item.unread {
  background: rgba(255, 106, 42, 0.035);
}

.notify-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
}

.notify-time {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-4);
}

.notify-body {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-3);
}

.topbar-menu {
  position: relative;
}

.risk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--warn-soft);
  border-radius: 8px;
  background: var(--warn-soft);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--warn);
}

.risk-bar svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.risk-bar a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Public / login */
.public {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
}

.public-left {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 34px 46px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(800px 600px at 8% 0%, rgba(255, 106, 42, 0.1), transparent 65%),
    radial-gradient(500px 500px at 80% 90%, rgba(255, 189, 115, 0.035), transparent 70%),
    #090a0c;
}

.public-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(80% 70% at 30% 40%, #000 20%, transparent 100%);
  pointer-events: none;
}

.public-left::after {
  content: "";
  position: absolute;
  right: -180px;
  top: 18%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  border: 1px solid rgba(255, 106, 42, 0.07);
  box-shadow:
    0 0 0 70px rgba(255, 106, 42, 0.02),
    0 0 0 150px rgba(255, 106, 42, 0.011);
  pointer-events: none;
}

.public-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.public-copy {
  margin: auto 0;
  max-width: 570px;
  padding: 50px 0;
}

.public-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--ember-line);
  border-radius: 999px;
  background: var(--ember-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-2);
}

.public-kicker .pip {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 106, 42, 0.12);
}

.public-title {
  margin-top: 20px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.public-title em {
  font-style: normal;
  color: var(--ember);
}

.public-sub {
  margin-top: 19px;
  max-width: 470px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-3);
}

.public-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  max-width: 520px;
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}

.public-feature {
  padding: 14px 15px;
  background: #0c0e11;
}

.public-feature .eyebrow {
  font-size: 8px;
  color: var(--ember-2);
}

.public-feature strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.public-feature span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-4);
}

.public-tape {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.public-quote {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.public-quote .q-sym {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--text-4);
}

.public-quote .q-price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-2);
}

.public-quote .q-chg {
  font-family: var(--font-mono);
  font-size: 9px;
}

.public-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--text-4);
}

.public-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background:
    radial-gradient(500px 400px at 100% 0%, rgba(255, 106, 42, 0.045), transparent 70%),
    #08090b;
}

.auth-card {
  width: min(390px, 100%);
}

.auth-head {
  margin-bottom: 21px;
}

.auth-title {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.auth-sub {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-3);
}

.auth-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
}

.auth-seg button {
  height: 31px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-4);
  font-size: 12px;
  font-weight: 500;
}

.auth-seg button.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form .field-label {
  font-size: 9.5px;
}

.auth-form .input {
  height: 40px;
  font-family: var(--font-ui);
  font-size: 13px;
}

.auth-error {
  display: none;
  padding: 9px 11px;
  border: 1px solid var(--short-line);
  border-radius: 7px;
  background: var(--short-soft);
  font-size: 11px;
  line-height: 1.45;
  color: #ff8aa2;
}

.auth-error.show {
  display: block;
}

.auth-submit {
  height: 42px;
  margin-top: 2px;
}

.auth-switch {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--text-4);
}

.auth-switch button {
  border: 0;
  background: transparent;
  color: var(--ember-2);
  font-size: inherit;
  padding: 0;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.auth-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-4);
}

.auth-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ember);
  stroke-width: 1.6;
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 40px;
}

.pass-toggle {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-4);
}

.pass-toggle:hover {
  color: var(--text-2);
}

.pass-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

/* Responsive */
@media (max-width: 1440px) {
  .terminal-grid {
    grid-template-columns: minmax(0, 1fr) 270px 300px;
  }
  .chart-panel .chart-shell {
    height: 400px;
  }
  .book-row {
    font-size: 10px;
  }
  .bot-row {
    grid-template-columns: minmax(160px, 1.2fr) 0.7fr 0.6fr 0.6fr auto;
  }
  .bot-row .bot-cell:nth-of-type(4) {
    display: none;
  }
}

@media (max-width: 1240px) {
  .terminal-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .terminal-side {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .ticket {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .ticket .panel-head {
    grid-column: 1 / -1;
  }
  .ticket-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column: 1 / -1;
  }
  .ticket-body > * {
    min-width: 0;
  }
  .ticket-body .submit-order,
  .ticket-body .ticket-note {
    grid-column: 1 / -1;
  }
  .stats-layout,
  .bot-detail-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  }
  .bots-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .bots-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .aside-card + .aside-card {
    margin-top: 0;
  }
  .hero-equity {
    grid-template-columns: 1fr;
  }
  .hero-chart {
    height: 120px;
    min-height: 120px;
  }
  .hero-chart-box {
    position: relative;
    height: 120px;
  }
}

@media (max-width: 1040px) {
  :root {
    --rail: 200px;
  }
  .content {
    padding-left: 18px;
    padding-right: 18px;
  }
  .topbar {
    padding: 0 18px;
  }
  .metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .metric-cell:nth-child(3) {
    border-right: 0;
  }
  .metric-cell:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-foot {
    grid-template-columns: repeat(2, 1fr);
  }
  .bot-row {
    grid-template-columns: minmax(160px, 1.3fr) 0.7fr 0.7fr auto;
  }
  .bot-row .bot-cell:nth-of-type(3) {
    display: none;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .docs-toc .eyebrow {
    width: 100%;
  }
  .docs-toc a {
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 10.5px;
  }
}

@media (max-width: 900px) {
  .public {
    grid-template-columns: 1fr;
  }
  .public-left {
    min-height: auto;
    padding: 26px 26px 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .public-copy {
    padding: 42px 0 22px;
  }
  .public-features {
    display: none;
  }
  .public-right {
    padding: 30px 24px 50px;
  }
  .public-foot {
    display: none;
  }
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.22s var(--ease);
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5);
  }
  body.rail-open .rail {
    transform: translateX(0);
  }
  body.rail-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(3, 4, 6, 0.6);
  }
  .rail-toggle {
    display: block;
  }
  .content {
    padding: 16px 14px 60px;
  }
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .top-price {
    display: none;
  }
  .breadcrumb {
    display: none;
  }
  .terminal-grid {
    grid-template-columns: 1fr;
  }
  .terminal-side {
    grid-column: auto;
    grid-row: auto;
  }
  .ticket {
    grid-template-columns: 1fr;
  }
  .ticket-body {
    grid-template-columns: 1fr;
  }
  .stats-layout,
  .bot-detail-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .bots-aside {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 23px;
  }
  .instrument {
    gap: 14px;
  }
  .instrument-actions {
    width: 100%;
    margin-left: 0;
  }
  .account-select {
    max-width: none;
    flex: 1;
  }
  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }
  .metric-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .metric-cell:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .metric-cell:last-child {
    border-bottom: 0;
  }
  .hero-equity {
    padding: 18px;
  }
  .hero-foot {
    margin: 2px -18px -18px;
  }
  .hero-cell {
    padding: 11px 18px;
  }
  .bot-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .bot-row .bot-cell {
    display: none;
  }
  .bot-mobile-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 2px;
    color: var(--text-3);
  }
  .bot-mobile-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-4);
  }
  .bot-mobile-status.running {
    color: var(--long);
  }
  .bot-mobile-status.running::before {
    background: var(--long);
  }
  .bot-mobile-status.paused {
    color: var(--warn);
  }
  .bot-mobile-status.paused::before {
    background: var(--warn);
  }
  .bot-actions {
    justify-self: end;
  }
  .form-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: auto;
  }
  .endpoint-desc {
    display: none;
  }
  .export-grid,
  .admin-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .top-right {
    gap: 2px;
  }
  .market-pill span:not(.pulse) {
    display: none;
  }
  .market-pill {
    width: 30px;
    padding: 0;
    justify-content: center;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-actions {
    width: 100%;
  }
  .bot-hero .page-actions {
    gap: 6px;
  }
  .bot-hero .page-actions .btn {
    padding: 9px 10px;
    font-size: 11px;
  }
  .bot-hero .page-actions [data-bot-action="backtest"] {
    display: none;
  }
  .hero-number {
    font-size: 34px;
  }
  .hero-chart {
    display: none;
  }
  .hero-foot {
    grid-template-columns: 1fr 1fr;
  }
  .instrument-price {
    font-size: 23px;
  }
  .instrument-meta {
    gap: 14px;
  }
  .ticket-avail {
    font-size: 9px;
  }
  .modal-wrap {
    padding: 10px;
  }
  .drawer-head {
    padding: 16px 16px 12px;
  }
  .drawer-body {
    padding: 15px 16px 20px;
  }
  .drawer-foot {
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.2;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0.5;
  }
}

@keyframes page-in {
  from {
    transform: translateY(5px);
    opacity: 0;
  }
}

.content > * {
  animation: page-in 0.28s var(--ease) both;
}

.live-pip {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--long);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.1);
}

.risk-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 8.5px;
  line-height: 1.55;
  color: var(--text-4);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 33px;
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
}

.check-row input {
  accent-color: var(--ember);
  width: 13px;
  height: 13px;
  margin: 0;
}

.drawer-form {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background: #0d0f13;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5);
  animation: drawer-in 0.24s var(--ease);
}

.chart-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 22px;
  text-align: center;
  border-radius: inherit;
  background: radial-gradient(70% 70% at 50% 45%, rgba(255, 106, 42, 0.035), rgba(9, 10, 13, 0.72));
  pointer-events: none;
}

.chart-empty .empty-title {
  font-size: 12px;
}

.chart-empty .empty-text {
  max-width: 270px;
  font-size: 10.5px;
}

.acct-card {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.acct-card:last-child {
  border-bottom: 0;
}

.acct-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.acct-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-kind {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--control);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-4);
}

.acct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.acct-cell .eyebrow {
  font-size: 8px;
}

.acct-cell strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
}

.panel-head > .tag,
.acct-top > .tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-4);
  white-space: nowrap;
}

.panel-head > .tag.pos {
  color: var(--long);
}

.panel-head > .tag.neg {
  color: var(--short);
}

.acct-top > .tag {
  color: var(--ember-2);
}



@media (max-width: 760px) {
  .wallet-btn {
    min-width: 0;
  }

  .wallet-name {
    max-width: 96px;
  }

  .wallet-menu {
    left: 0;
    right: auto;
    width: min(300px, calc(100vw - 32px));
  }

  .wallet-switch {
    position: static;
  }

  .instrument-actions {
    position: relative;
  }

  .type-tabs .tab {
    font-size: 9.5px;
  }
}

@media (max-width: 480px) {
  .wallet-balance {
    display: none;
  }

  .wallet-item-actions {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------- AI trader */
.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(322px, 0.55fr);
  gap: 11px;
  align-items: start;
}

.ai-main,
.ai-side {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.ai-variants {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.pick {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--control);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.pick:hover {
  border-color: var(--line-strong);
}

.pick.active {
  border-color: rgba(255, 122, 56, 0.46);
  background: rgba(255, 122, 56, 0.06);
}

.pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pick:focus-within {
  outline: 1px solid rgba(255, 122, 56, 0.55);
  outline-offset: 1px;
}

.pick-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.pick.active .pick-name {
  color: var(--text);
}

.pick-desc {
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--text-4);
}

.ai-run-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.ai-run-bar strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.ai-run-bar span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-4);
}

.ai-key-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ai-note {
  display: block;
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--text-4);
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 26px 18px;
  font-size: 11px;
  color: var(--text-3);
}

.spinner {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: ai-spin 0.7s linear infinite;
}

@keyframes ai-spin {
  to {
    transform: rotate(360deg);
  }
}

#aiKeyEye {
  border-left: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .ai-layout {
    grid-template-columns: 1fr;
  }

  .ai-side {
    order: 2;
  }
}
