:root {
  color-scheme: dark;
  --bg: #090d12;
  --panel: #10161e;
  --line: #222c38;
  --muted: #738296;
  --text: #e5edf4;
  --green: #36edab;
  --cyan: #4bd7ee;
  --red: #ff5c79;
  --font: Inter, "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 42% -15%, #19303955, transparent 46%), var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button {
  color: inherit;
}
h1,
h2,
p {
  margin: 0;
}
h2 {
  font-size: 13px;
  font-weight: 600;
}
small {
  font-size: 10px;
}
.hidden {
  display: none !important;
}
.green {
  color: var(--green) !important;
}
.red {
  color: var(--red) !important;
}
.cyan {
  color: var(--cyan) !important;
}
.muted {
  color: var(--muted);
}
.rail {
  width: 72px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #0c1119e8;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 5;
  backdrop-filter: blur(20px);
}
.brandmark {
  margin-top: 23px;
  font-size: 31px;
  font-weight: 850;
  color: var(--green);
  position: relative;
  letter-spacing: -7px;
  padding-right: 8px;
}
.brandmark span {
  font-size: 10px;
  position: absolute;
  top: 1px;
  right: -1px;
  color: var(--cyan);
}
.rail-line {
  height: 1px;
  background: var(--line);
  width: 30px;
  margin: 25px 0 21px;
}
.rail-button {
  border: 0;
  background: none;
  font-size: 23px;
  color: #69788c;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin: 6px 0;
}
.rail-button:hover {
  color: var(--text);
  background: #18212d;
}
.rail-button.active {
  color: var(--green);
  background: #36edab11;
  border: 1px solid #36edab28;
  box-shadow: 0 0 22px #36edab08;
}
.rail-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 15px 0;
}
.tiny-label {
  font: 9px var(--mono);
  color: #546477;
}
main {
  margin-left: 72px;
  padding: 0 30px;
}
.header {
  height: 83px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-size: 19px;
  letter-spacing: 3px;
  font-weight: 800;
}
.wordmark > span {
  color: var(--green);
  margin: 0 7px;
  font-weight: 400;
}
.wordmark b {
  font-weight: 400;
  letter-spacing: 2.5px;
}
.wordmark small {
  display: block;
  font: 8px var(--mono);
  letter-spacing: 2.2px;
  color: var(--muted);
  margin-top: 7px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 19px;
  font: 10px var(--mono);
}
.header-divider {
  height: 22px;
  width: 1px;
  background: var(--line);
}
.connection {
  color: var(--muted);
  white-space: nowrap;
}
.connection i {
  display: inline-block;
  background: var(--red);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
}
.connection.online {
  color: var(--green);
}
.connection.online i {
  background: var(--green);
  box-shadow: 0 0 8px #36edab88;
}
.header-right time {
  color: var(--muted);
  font-size: 11px;
}
.badge {
  font: 9px var(--mono);
  letter-spacing: 1px;
  padding: 8px 10px;
  border: 1px solid #4bd7ee44;
  color: var(--cyan);
  background: #4bd7ee09;
  border-radius: 5px;
}
.badge.live {
  border-color: #ff5c7944;
  color: var(--red);
  background: #ff5c7911;
}
.badge.testnet {
  color: #f3c169;
  border-color: #f3c16944;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 29px 0 26px;
  gap: 16px;
}
.eyebrow {
  font: 8px var(--mono);
  letter-spacing: 2.4px;
  color: var(--muted);
  margin-bottom: 10px;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
  font-weight: 600;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px #36edab55;
  vertical-align: middle;
}
h1 .live-dot {
  margin-left: 13px;
}
.page-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.heading-actions {
  display: flex;
  gap: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green);
  color: #06251c;
  border: 1px solid var(--green);
  padding: 11px 18px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.button:hover {
  box-shadow: 0 0 20px #36edab18;
  background: #60f6be;
}
.button.secondary {
  background: #131b25;
  color: #c5d0dd;
  border-color: #2b3746;
}
.button.secondary:hover {
  background: #1c2937;
  box-shadow: none;
}
.button.danger {
  background: #ff5c7910;
  color: var(--red);
  border-color: #ff5c793d;
  font: 10px var(--mono);
  letter-spacing: 0.3px;
}
.button.danger:hover {
  background: #ff5c7925;
  box-shadow: none;
}
.button.small {
  padding: 8px 11px;
  font-size: 10px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric,
.panel {
  background: linear-gradient(125deg, #151d27aa, #0e151df0);
  border: 1px solid var(--line);
  border-radius: 9px;
  backdrop-filter: blur(18px);
}
.metric {
  padding: 18px 20px;
  min-height: 129px;
  position: relative;
  overflow: hidden;
}
.metric-label {
  font: 9px var(--mono);
  letter-spacing: 0.7px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric-label > span {
  font-size: 8px;
  color: #8999ae;
  background: #1a2430;
  padding: 3px 5px;
  border-radius: 3px;
}
.metric-value {
  font: 29px var(--mono);
  letter-spacing: -1px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.metric-value small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}
.metric-foot {
  color: var(--muted);
  font-size: 10px;
  margin-top: 10px;
}
.metric-foot b {
  color: #a7b6c7;
  font-weight: 400;
  font-family: var(--mono);
}
.metric-spark {
  position: absolute;
  bottom: 12px;
  right: 15px;
  color: #36edab24;
  font-size: 25px;
  letter-spacing: -2px;
}
.risk-budget {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.risk-budget b {
  font: 24px var(--mono);
}
.risk-budget span {
  font-size: 10px;
  color: var(--muted);
}
.meter {
  height: 3px;
  background: #27303b;
  border-radius: 3px;
  margin-top: 11px;
  overflow: hidden;
}
.meter i {
  display: block;
  background: var(--green);
  height: 100%;
  width: 0;
  transition: width 0.4s;
}
.terminal-grid {
  display: grid;
  grid-template-columns: 270px minmax(400px, 1fr) 260px;
  grid-template-rows: 488px auto;
  gap: 16px;
}
.panel {
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  height: 51px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.panel-head h2 > span {
  margin-right: 6px;
}
.panel-head small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 10px;
}
.tag {
  font: 8px var(--mono);
  color: var(--muted);
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
}
.scanner {
  display: flex;
  flex-direction: column;
}
.scanner-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  font: 8px var(--mono);
  letter-spacing: 0.3px;
  color: var(--muted);
}
.scanner-sub span {
  color: var(--green);
  font-size: 7px;
}
.scanner-head,
.scanner-row {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.65fr;
  align-items: center;
  padding: 0 14px;
}
.scanner-head {
  color: #5d7085;
  font: 7px var(--mono);
  padding-bottom: 10px;
  border-bottom: 1px solid #1c2733;
}
.scanner-head span:last-child {
  text-align: right;
}
.scanner-rows {
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #263545 transparent;
}
.scanner-row {
  width: 100%;
  height: 59px;
  background: none;
  border: 0;
  border-bottom: 1px solid #1b2632;
  text-align: left;
}
.scanner-row:hover {
  background: #4bd7ee07;
}
.scanner-row.selected {
  background: #36edab09;
  box-shadow: inset 2px 0 var(--green);
}
.scanner-symbol b {
  font: 11px var(--mono);
  display: block;
  font-weight: 600;
}
.scanner-symbol small {
  display: block;
  color: var(--muted);
  font: 8px var(--mono);
  margin-top: 6px;
}
.scanner-change {
  font: 10px var(--mono);
}
.scanner-change small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin-top: 6px;
}
.score {
  text-align: right;
  color: var(--green);
  font: 12px var(--mono);
}
.score i {
  display: block;
  margin-top: 6px;
  height: 3px;
  background: #233c37;
  border-radius: 1px;
}
.score i b {
  display: block;
  height: 100%;
  background: var(--green);
  opacity: 0.7;
}
.scanner-footer {
  border-top: 1px solid var(--line);
  padding: 12px;
  font-size: 8px;
  color: var(--muted);
}
.scanner-footer .live-dot {
  margin-right: 5px;
}
.chart-panel {
  position: relative;
  display: flex;
  flex-direction: column;
}
.chart-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}
.instrument {
  display: flex;
  align-items: center;
  gap: 10px;
}
.coin-icon {
  width: 31px;
  height: 31px;
  background: #f7b64c15;
  color: #f7b64c;
  border: 1px solid #f7b64c22;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 18px;
}
.instrument h2 {
  font: 14px var(--mono);
  font-weight: 700;
}
.instrument h2 span {
  font: 10px var(--mono);
  color: var(--muted);
}
.instrument small {
  font: 7px var(--mono);
  color: var(--muted);
  letter-spacing: 0.5px;
  display: block;
  margin-top: 5px;
}
.instrument-price {
  margin-left: auto;
  text-align: right;
}
.instrument-price > b {
  font: 16px var(--mono);
  display: block;
}
.instrument-price > small {
  font: 9px var(--mono);
  display: block;
  margin-top: 5px;
}
.timeframes {
  display: flex;
  background: #0b1118;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 5px;
  margin-left: 8px;
}
.timeframes button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 7px;
  font: 9px var(--mono);
  border-radius: 3px;
}
.timeframes button.active {
  background: #273442;
  color: var(--text);
}
.chart-indicators {
  font: 8px var(--mono);
  padding: 0 19px 12px;
  display: flex;
  gap: 18px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.chart-indicators b {
  color: #bccbd7;
  font-weight: 400;
  margin-left: 3px;
}
.chart-canvas {
  flex: 1;
  min-height: 250px;
}
.chart-empty {
  position: absolute;
  top: 48%;
  width: 100%;
  text-align: center;
  font: 11px var(--mono);
  color: var(--muted);
  pointer-events: none;
}
.chart-footer {
  height: 34px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  gap: 10px;
  font-size: 8px;
  color: var(--muted);
}
.chart-footer > span {
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-footer b {
  font-weight: 400;
  margin-left: 4px;
}
.chart-footer a {
  font-size: 7px;
  white-space: nowrap;
}
.flow-panel {
  display: flex;
  flex-direction: column;
}
.flow-tabs {
  display: flex;
  padding: 12px 16px 10px;
  gap: 15px;
}
.flow-tabs button {
  font-size: 10px;
  background: none;
  border: 0;
  padding: 3px 0 7px;
  color: var(--muted);
}
.flow-tabs button.active {
  color: var(--text);
  border-bottom: 1px solid var(--cyan);
}
.book-columns {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr;
  padding: 0 15px 8px;
  color: #627286;
  font: 7px var(--mono);
}
.book-columns span:not(:first-child) {
  text-align: right;
}
.book-levels {
  padding: 0 12px;
}
.book-row {
  height: 20px;
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr;
  align-items: center;
  position: relative;
  font: 9px var(--mono);
  padding: 0 3px;
  gap: 5px;
}
.book-row:before {
  content: "";
  position: absolute;
  right: 0;
  top: 1px;
  bottom: 1px;
  width: var(--depth, 0%);
  background: var(--row-color);
  opacity: 0.1;
}
.book-row span {
  z-index: 1;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.book-row span:not(:first-child) {
  text-align: right;
  color: #91a1b3;
  font-size: 8px;
}
.mid-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  margin: 3px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mid-price b {
  font: 16px var(--mono);
  color: var(--green);
}
.mid-price > span {
  color: var(--muted);
  font: 8px var(--mono);
}
.flow-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 12px 15px;
  background: #0b12197d;
}
.flow-bottom > div:first-child {
  display: flex;
  justify-content: space-between;
  font: 7px var(--mono);
  color: var(--muted);
}
.flow-bottom b {
  font-weight: 400;
  color: var(--green);
}
.pressure-meter {
  height: 4px;
  background: #ff5c7944;
  border-radius: 3px;
  margin: 8px 0 12px;
  overflow: hidden;
}
.pressure-meter i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--green);
  transition: width 0.3s;
}
.delta-row {
  display: flex;
  justify-content: space-between;
  font: 7px var(--mono);
  color: var(--muted);
  gap: 5px;
}
.delta-row b {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}
#tapeView {
  overflow: hidden;
  max-height: 310px;
  padding: 0 0 0;
}
#tapeRows {
  padding: 0 12px;
}
.position-panel {
  grid-column: 1 / 3;
  min-height: 224px;
}
.position-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  gap: 22px;
  padding: 20px;
}
.crosshair {
  font-size: 48px;
  color: #30423e;
  font-weight: 300;
}
.position-empty b {
  font-size: 13px;
  font-weight: 500;
}
.position-empty p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
}
.scan-animation {
  display: flex;
  align-items: center;
  height: 22px;
  gap: 3px;
  margin-left: 10px;
}
.scan-animation i {
  width: 2px;
  height: 15px;
  background: var(--green);
  opacity: 0.3;
  animation: scan 1.6s infinite;
}
.scan-animation i:nth-child(2) {
  animation-delay: 0.3s;
}
.scan-animation i:nth-child(3) {
  animation-delay: 0.6s;
}
@keyframes scan {
  50% {
    height: 6px;
    opacity: 0.9;
  }
}
.position-summary {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 16px 20px 10px;
}
.position-summary > div:first-child b {
  font: 15px var(--mono);
}
.position-summary small {
  display: block;
  font: 9px var(--mono);
  color: var(--muted);
  margin-top: 5px;
}
.position-pnl {
  margin-left: auto;
  font: 25px var(--mono);
}
.position-levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px 20px;
}
.position-levels small {
  display: block;
  font: 8px var(--mono);
  color: var(--muted);
  margin-bottom: 6px;
}
.position-levels b {
  font: 12px var(--mono);
}
.position-progress {
  margin: 8px 20px 14px;
  background: #273342;
  height: 3px;
}
.position-progress i {
  display: block;
  background: var(--green);
  width: 0;
  height: 100%;
}
.protection-edit {
  padding: 0 20px 15px;
}
.protection-edit summary {
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
}
.protection-edit form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}
.protection-edit label {
  flex: 1;
  font-size: 10px;
  color: var(--muted);
}
.protection-edit p {
  font-size: 9px;
  color: var(--muted);
  margin-top: 9px;
}
.logs-panel {
  grid-column: 3;
  grid-row: 2;
  min-height: 224px;
}
.log-lines {
  height: 176px;
  overflow: auto;
  padding: 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: #263545 transparent;
  font: 8px/1.8 var(--mono);
}
.log-row {
  padding: 2px 0;
  word-break: break-word;
}
.log-row time {
  color: #506377;
  margin-right: 6px;
}
.log-row .log-level {
  color: var(--cyan);
  margin-right: 5px;
}
.log-row .log-message {
  color: #a3b2c4;
}
.log-row.ERROR .log-level,
.log-row.ERROR .log-message {
  color: var(--red);
}
.log-row.RISK .log-level,
.log-row.WARN .log-level {
  color: #f3c169;
}
.log-row.FILL .log-level,
.log-row.CLOSE .log-level {
  color: var(--green);
}
.bottom-note {
  display: flex;
  justify-content: space-between;
  font: 8px var(--mono);
  color: #65778b;
  padding: 15px 1px;
}
.bottom-note .live-dot {
  margin-right: 7px;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  font: 7px var(--mono);
  letter-spacing: 1px;
  color: #52667c;
  margin-top: 12px;
}
footer b {
  color: var(--green);
  margin: 0 7px;
  font-weight: 400;
}
.empty {
  text-align: center;
  padding: 65px 15px;
  font-size: 11px;
  color: var(--muted);
}
.warning {
  border: 1px solid #ffbe4540;
  background: #ffbe4509;
  color: #e9c486;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 11px;
}
.history-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.history-metrics .panel {
  padding: 23px;
}
.history-metrics span {
  display: block;
  font: 9px var(--mono);
  color: var(--muted);
}
.history-metrics b {
  display: block;
  margin-top: 15px;
  font: 28px var(--mono);
}
.history-panel {
  min-height: 430px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font: 11px var(--mono);
}
th {
  color: #6c8197;
  font-size: 8px;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 16px;
}
td {
  padding: 17px 16px;
  border-top: 1px solid #202b36;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 5px;
}
.settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.settings-toolbar > div > small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}
.settings-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.settings-actions select {
  width: auto;
  font-size: 10px;
  margin: 0;
  padding: 9px;
}
.file-button {
  cursor: pointer;
}
.settings-layout {
  display: grid;
  grid-template-columns: 160px minmax(400px, 1fr) 260px;
  gap: 20px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  align-self: start;
  position: sticky;
  top: 15px;
  gap: 4px;
}
.settings-nav button {
  background: none;
  border: 0;
  color: var(--muted);
  text-align: left;
  padding: 13px 12px;
  font-size: 11px;
  border-radius: 5px;
}
.settings-nav button.active {
  background: #36edab0b;
  color: var(--green);
  border-left: 2px solid var(--green);
}
.settings-group {
  margin-bottom: 16px;
}
.settings-group .panel-head {
  height: 64px;
}
.settings-group .panel-head h2 {
  font-size: 14px;
}
.settings-group .panel-head p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.setting-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
  padding: 5px 22px 20px;
}
.setting-field {
  padding: 16px 0 0;
  min-width: 0;
}
.setting-field > label {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.setting-field code {
  font: 8px var(--mono);
  color: #50667e;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setting-field p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 7px;
}
.setting-field.wide {
  grid-column: 1/-1;
}
input,
select {
  border: 1px solid #2b3a4b;
  border-radius: 5px;
  background: #0a1119;
  color: #d6e2ee;
  padding: 10px 12px;
  width: 100%;
  margin-top: 8px;
  transition: border-color 0.2s;
}
input:focus,
select:focus {
  border-color: var(--cyan);
  outline: 0;
  box-shadow: 0 0 0 2px #4bd7ee15;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  margin: 10px 0;
}
.settings-aside {
  align-self: start;
  position: sticky;
  top: 15px;
  display: grid;
  gap: 16px;
}
.risk-preview {
  padding: 7px 18px 0;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  font-size: 10px;
  color: var(--muted);
}
.preview-row b {
  font: 11px var(--mono);
  color: var(--text);
}
.helper {
  padding: 15px 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.settings-note {
  padding: 20px;
  font-size: 11px;
  line-height: 1.8;
}
.settings-note > span {
  font-size: 23px;
  display: block;
  margin-bottom: 7px;
}
.settings-note p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.credential-form {
  padding: 20px 22px;
}
.credential-form h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 10px;
}
.credential-form .form-row {
  display: flex;
  gap: 12px;
  align-items: end;
}
.credential-form label {
  font-size: 11px;
  flex: 1;
}
.credential-form p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 15px;
}
.credential-form button {
  margin-top: 14px;
}
.credential-status {
  font: 10px var(--mono);
  color: var(--green);
  margin: 12px 0;
}
.credential-check {
  font: 10px/1.8 var(--mono);
  color: var(--muted);
  white-space: pre-wrap;
  margin: 12px 0;
}
.credential-form + .credential-form {
  border-top: 1px solid var(--line);
}
dialog {
  color: var(--text);
  background: #111b25;
  border: 1px solid #435269;
  border-radius: 12px;
  width: 420px;
  padding: 30px;
  box-shadow: 0 20px 120px #000b;
}
dialog::backdrop {
  background: #03070dcc;
  backdrop-filter: blur(5px);
}
.dialog-icon {
  color: var(--red);
  font-size: 28px;
}
dialog h2 {
  font-size: 20px;
  margin: 16px 0;
}
dialog p {
  font-size: 12px;
  line-height: 1.8;
  color: #9daec0;
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: 23px;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 480px;
  z-index: 99;
  background: #172936;
  border: 1px solid #4bd7ee55;
  box-shadow: 0 10px 40px #0008;
  border-radius: 7px;
  padding: 15px 20px;
  font-size: 12px;
  line-height: 1.6;
  transform: translateY(140%);
  opacity: 0;
  transition: 0.2s;
}
#toast.visible {
  transform: translateY(0);
  opacity: 1;
}
#toast.error {
  border-color: #ff5c7999;
  color: #ffb0bf;
  background: #271c26;
}
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 45% 35%, #133c3c55, transparent 55%), #090d12;
  overflow: hidden;
}
.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#3bbfad05 1px, transparent 1px),
    linear-gradient(90deg, #3bbfad05 1px, transparent 1px);
  background-size: 55px 55px;
  mask-image: linear-gradient(transparent, #000, transparent);
}
.login-card {
  position: relative;
  width: min(430px, calc(100vw - 40px));
  padding: 39px;
  background: #101923dd;
  backdrop-filter: blur(18px);
  border: 1px solid #28413f;
  border-radius: 14px;
  box-shadow: 0 0 100px #36edab06;
}
.login-logo {
  font-size: 25px;
  letter-spacing: 2px;
  font-weight: 700;
  margin: 19px 0 13px;
}
.login-logo > span {
  color: var(--green);
  margin: 0 7px;
}
.login-card > p {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 30px;
}
.login-card label {
  display: block;
  font-size: 11px;
  color: #adbfce;
  margin-top: 17px;
}
.login-card input {
  padding: 13px;
}
.login-card .button {
  width: 100%;
  justify-content: space-between;
  margin-top: 23px;
  padding: 13px 16px;
}
.login-footer {
  font: 7px var(--mono);
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 30px;
}
.login-footer .live-dot {
  margin-right: 7px;
}
#loginError {
  font-size: 11px;
  line-height: 1.7;
  color: var(--red);
  margin-top: 12px;
}
@media (min-width: 1600px) {
  .terminal-grid {
    grid-template-columns: 300px minmax(500px, 1fr) 300px;
    grid-template-rows: 540px auto;
  }
  .book-row {
    height: 23px;
  }
  .chart-top {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .flow-tabs {
    padding-top: 17px;
    padding-bottom: 15px;
  }
  main {
    padding: 0 40px;
  }
  .logs-panel {
    min-height: 240px;
  }
  .log-lines {
    height: 185px;
  }
}
@media (max-width: 1230px) {
  main {
    padding: 0 20px;
  }
  .terminal-grid {
    grid-template-columns: 230px minmax(350px, 1fr);
    grid-template-rows: 450px auto auto;
  }
  .flow-panel {
    grid-column: 1;
    grid-row: 2/4;
    min-height: 470px;
  }
  .position-panel {
    grid-column: 2;
    grid-row: 2;
  }
  .logs-panel {
    grid-column: 2;
    grid-row: 3;
    min-height: 230px;
  }
  .settings-layout {
    grid-template-columns: 145px 1fr;
  }
  .settings-aside {
    grid-column: 2;
    position: static;
    grid-template-columns: 1fr 1fr;
  }
  .header-right time {
    display: none;
  }
  .settings-toolbar {
    align-items: start;
    flex-direction: column;
  }
  .settings-actions {
    flex-wrap: wrap;
  }
  .metrics-grid {
    gap: 10px;
  }
  .metric {
    padding: 16px 14px;
  }
  .metric-value {
    font-size: 24px;
  }
  .risk-budget b {
    font-size: 20px;
  }
  .risk-budget span {
    font-size: 8px;
  }
  .chart-top {
    gap: 9px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .timeframes {
    margin-left: 0;
  }
  .timeframes button {
    padding: 5px;
  }
  .instrument-price > b {
    font-size: 13px;
  }
  .instrument h2 {
    font-size: 12px;
  }
  .coin-icon {
    display: none;
  }
  .chart-indicators {
    gap: 10px;
  }
  .bottom-note > span:last-child {
    display: none;
  }
}
@media (max-width: 800px) {
  .rail {
    width: 54px;
  }
  .rail-button {
    width: 37px;
    height: 39px;
  }
  .brandmark {
    font-size: 27px;
  }
  main {
    margin-left: 54px;
    padding: 0 14px;
  }
  .header {
    height: 74px;
  }
  .wordmark {
    font-size: 14px;
    letter-spacing: 1px;
  }
  .wordmark b {
    letter-spacing: 1px;
  }
  .wordmark small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .header-right {
    gap: 8px;
  }
  .header-divider {
    display: none;
  }
  .connection {
    font-size: 0;
  }
  .connection i {
    width: 7px;
    height: 7px;
    margin: 0;
  }
  .badge {
    font-size: 7px;
    padding: 7px;
  }
  .page-heading {
    padding: 23px 0;
    align-items: start;
  }
  .page-heading .eyebrow {
    font-size: 6px;
    letter-spacing: 1px;
  }
  h1 {
    font-size: 22px;
  }
  .page-heading p {
    font-size: 10px;
    max-width: 210px;
    line-height: 1.6;
  }
  .heading-actions {
    flex-direction: column;
    gap: 7px;
  }
  .heading-actions .button {
    padding: 9px 12px;
    font-size: 9px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    min-height: 120px;
  }
  .terminal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 420px 320px auto auto auto;
  }
  .chart-panel {
    grid-column: 1;
    grid-row: 1;
  }
  .scanner {
    grid-column: 1;
    grid-row: 2;
  }
  .flow-panel {
    grid-column: 1;
    grid-row: 4;
    min-height: 460px;
  }
  .position-panel {
    grid-column: 1;
    grid-row: 3;
  }
  .logs-panel {
    grid-column: 1;
    grid-row: 5;
  }
  .scanner-head,
  .scanner-row {
    grid-template-columns: 1.5fr 1fr 0.5fr;
  }
  .scanner-row {
    height: 54px;
  }
  .scanner-footer {
    padding: 10px;
  }
  .chart-top {
    gap: 7px;
  }
  .chart-indicators {
    font-size: 7px;
    gap: 9px;
    padding-left: 12px;
  }
  .instrument-price > b {
    font-size: 12px;
  }
  .timeframes button {
    font-size: 8px;
  }
  .instrument h2 {
    font-size: 11px;
  }
  .instrument h2 span {
    font-size: 8px;
  }
  .position-summary {
    padding: 16px 13px 8px;
    gap: 7px;
  }
  .position-pnl {
    font-size: 21px;
  }
  .position-summary > div:first-child b {
    font-size: 12px;
  }
  .position-summary small {
    font-size: 8px;
  }
  .position-levels {
    padding: 10px 13px;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .position-empty {
    gap: 12px;
    padding: 15px;
  }
  .position-empty p {
    line-height: 1.7;
  }
  .position-empty b {
    font-size: 12px;
  }
  .position-progress {
    margin-left: 13px;
    margin-right: 13px;
  }
  .position-panel .panel-head {
    height: 48px;
  }
  .scan-animation {
    display: none;
  }
  .history-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .history-metrics .panel {
    padding: 17px;
  }
  .history-metrics b {
    font-size: 22px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .settings-nav button {
    font-size: 10px;
    padding: 9px;
  }
  .settings-nav button.active {
    border-left: 0;
    border-bottom: 1px solid var(--green);
  }
  .settings-aside {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
  .setting-fields {
    grid-template-columns: 1fr;
    padding: 0 16px 20px;
  }
  .setting-field > label {
    font-size: 12px;
  }
  .setting-field code {
    font-size: 8px;
  }
  .settings-group .panel-head {
    padding-left: 16px;
  }
  .settings-actions {
    gap: 6px;
  }
  .settings-actions .button {
    font-size: 9px;
    padding: 8px;
  }
  .settings-actions select {
    max-width: 145px;
    font-size: 9px;
  }
  .settings-toolbar > div > b {
    font-size: 14px;
  }
  .credential-form {
    padding: 20px 16px;
  }
  .credential-form .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .credential-form .form-row label {
    width: 100%;
  }
  .bottom-note {
    font-size: 7px;
    line-height: 1.8;
  }
  footer {
    font-size: 6px;
    letter-spacing: 0.4px;
    gap: 10px;
  }
  .protection-edit form {
    flex-wrap: wrap;
  }
  .protection-edit label {
    flex-basis: 40%;
  }
  .header-right .connection {
    display: block;
  }
  #toast {
    left: 67px;
    right: 13px;
    bottom: 15px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.protection-edit input[type="range"] {
  padding: 0;
  height: 18px;
  border: 0;
  box-shadow: none;
  accent-color: var(--green);
  background: transparent;
}
.protection-edit #slRange {
  accent-color: var(--red);
}
