:root {
  color: #f5f7fa;
  background: #000000;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #000000;
  color: #f5f7fa;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.member-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 8%, rgba(0, 200, 5, 0.16), transparent 22%),
    radial-gradient(circle at 58% 0%, rgba(42, 205, 255, 0.075), transparent 26%),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.055), transparent 28%),
    linear-gradient(180deg, #000000 0%, #050607 48%, #090b0f 100%);
  color: #f5f7fa;
}

.member-app--desktop-dashboard {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.member-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  min-height: 100vh;
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 200, 5, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(13, 15, 18, 0.98), rgba(2, 3, 4, 0.98)),
    #030405;
  color: #f5f7fa;
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.34);
}

.member-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.member-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: linear-gradient(145deg, #171b21, #050607);
  color: #00c805;
  font-weight: 900;
  box-shadow:
    0 0 18px rgba(0, 200, 5, 0.18),
    inset 0 0 18px rgba(255, 255, 255, 0.04);
}

.member-brand strong,
.member-card strong,
.member-nav strong,
.member-bottom-nav strong,
h1,
h2,
h3 {
  letter-spacing: 0;
}

.member-brand strong,
.member-card strong {
  display: block;
}

.member-brand span,
.member-card span {
  color: #8c929c;
  font-size: 0.82rem;
}

.member-card,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 23, 28, 0.96), rgba(10, 12, 15, 0.98)),
    #101216;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.36),
    0 0 36px rgba(0, 200, 5, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.member-card {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(25, 28, 34, 0.88), rgba(9, 11, 14, 0.92)),
    #0d0f13;
  box-shadow:
    0 0 24px rgba(0, 200, 5, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.member-card--identity {
  border-color: rgba(255, 255, 255, 0.1);
}

.member-card--identity strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.member-nav {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.member-nav button,
.member-bottom-nav button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.member-nav button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
  color: #9aa1aa;
}

.member-nav button span,
.member-bottom-nav button span {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8ced6;
  font-weight: 900;
}

.member-nav button span {
  width: 30px;
  height: 30px;
}

.member-nav button:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.035);
}

.member-nav button.active {
  border-color: rgba(0, 200, 5, 0.32);
  background: linear-gradient(90deg, rgba(0, 200, 5, 0.13), rgba(255, 255, 255, 0.04));
  color: #ffffff;
  box-shadow:
    0 0 22px rgba(0, 200, 5, 0.12),
    inset 0 0 18px rgba(0, 200, 5, 0.055);
}

.member-nav button.active span {
  background: rgba(0, 200, 5, 0.12);
  color: #00c805;
  text-shadow: 0 0 14px rgba(0, 200, 5, 0.55);
}

.member-main {
  min-width: 0;
  padding: 22px;
}

.member-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  min-width: 0;
}

.member-screen-heading {
  min-width: 0;
}

.member-screen-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  line-height: 1.02;
}

.member-screen-heading p {
  margin: 4px 0 0;
  color: #8c929c;
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.member-market-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(390px, 46vw);
}

.member-market-strip span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #8c929c;
  font-size: 0.76rem;
  font-weight: 800;
  min-height: 30px;
  padding: 5px 8px;
  box-shadow: 0 0 18px rgba(42, 205, 255, 0.035);
}

.member-market-strip strong {
  color: #f5f7fa;
}

.member-workspace {
  min-width: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(240px, 0.9fr) minmax(220px, 0.7fr);
  gap: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1.3fr);
  gap: 14px;
}

.mobile-stack {
  display: grid;
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel--hero {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 92% 10%, rgba(0, 200, 5, 0.13), transparent 34%),
    radial-gradient(circle at 12% 0%, rgba(42, 205, 255, 0.065), transparent 28%),
    linear-gradient(135deg, rgba(38, 43, 52, 0.55), rgba(12, 14, 18, 0.98) 58%),
    #101216;
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(0, 200, 5, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.panel-heading,
.record-row,
.record-card,
.record-card-meta,
.profile-row,
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel h3 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 1.32rem;
}

.panel p {
  color: #9299a3;
  margin: 8px 0 12px;
}

.eyebrow {
  display: block;
  color: #8c929c;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.soft-pill,
.mode-pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d8dde4;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 7px 10px;
}

.member-action-button {
  min-height: 38px;
  border: 1px solid rgba(0, 200, 5, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, #00d10a, #00a305);
  color: #020402;
  font-weight: 900;
  padding: 9px 12px;
  box-shadow:
    0 12px 30px rgba(0, 200, 5, 0.24),
    0 0 24px rgba(0, 200, 5, 0.2);
}

.member-action-button--secondary {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f5f7fa;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.035);
}

.quick-actions,
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-row span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #a1a8b2;
  padding: 8px 10px;
}

.stat-row strong {
  color: #00c805;
  text-shadow: 0 0 16px rgba(0, 200, 5, 0.28);
}

.panel-heading {
  margin-bottom: 12px;
}

.panel-heading h3 {
  margin: 0;
}

.panel-heading span {
  color: #c8ced6;
  font-size: 0.84rem;
  font-weight: 800;
}

.panel-heading--spaced {
  margin-top: 18px;
}

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

.metric-tile {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  box-shadow: 0 0 22px rgba(42, 205, 255, 0.025);
}

.metric-tile span,
.detail-row span,
.empty-copy {
  color: #8c929c;
  font-size: 0.86rem;
}

.metric-tile strong,
.detail-row strong {
  display: block;
  margin-top: 2px;
  color: #f5f7fa;
  overflow-wrap: anywhere;
}

.metric-tile strong {
  color: #00c805;
  text-shadow: 0 0 16px rgba(0, 200, 5, 0.26);
}

.detail-stack {
  display: grid;
  gap: 4px;
}

.detail-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 11px 0;
}

.detail-row:last-child {
  border-bottom: 0;
}

.scan-panel {
  display: grid;
  justify-items: start;
}

.qr-frame {
  position: relative;
  width: min(180px, 100%);
  aspect-ratio: 1;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #0d0f13;
  background-size: 18px 18px;
  box-shadow:
    0 0 28px rgba(0, 200, 5, 0.08),
    inset 0 0 22px rgba(42, 205, 255, 0.04);
}

.qr-frame span {
  position: absolute;
  width: 38px;
  height: 38px;
  border-color: #00c805;
  border-style: solid;
  filter: drop-shadow(0 0 9px rgba(0, 200, 5, 0.42));
}

.qr-frame span:nth-child(1) {
  top: 16px;
  left: 16px;
  border-width: 7px 0 0 7px;
}

.qr-frame span:nth-child(2) {
  top: 16px;
  right: 16px;
  border-width: 7px 7px 0 0;
}

.qr-frame span:nth-child(3) {
  right: 16px;
  bottom: 16px;
  border-width: 0 7px 7px 0;
}

.qr-frame span:nth-child(4) {
  bottom: 16px;
  left: 16px;
  border-width: 0 0 7px 7px;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-list--cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.record-row,
.record-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.018);
}

.record-row strong,
.record-row span,
.profile-row strong,
.profile-row span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-row strong,
.record-card h3,
.profile-row strong {
  color: #ffffff;
}

.record-row span,
.record-row time,
.record-card p,
.profile-row span {
  color: #8c929c;
  font-size: 0.86rem;
}

.record-row time {
  color: #c8ced6;
  font-weight: 800;
}

.record-card {
  align-items: flex-start;
}

.record-card h3 {
  margin: 2px 0 6px;
}

.record-card-meta {
  align-items: flex-end;
  flex-direction: column;
  text-align: right;
}

.record-card-meta > span:first-child {
  color: #00c805;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(0, 200, 5, 0.3);
}

.profile-table {
  display: grid;
  gap: 8px;
}

.profile-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 9px 0;
}

.profile-row:last-child {
  border-bottom: 0;
}

.member-bottom-nav {
  display: none;
}

@media (max-width: 899px), (orientation: portrait) {
  .member-app {
    display: block;
    padding-bottom: 84px;
  }

  .member-sidebar {
    display: none;
  }

  .member-main {
    padding: 12px;
  }

  .member-screen-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .member-screen-heading h1 {
    font-size: clamp(1.7rem, 8.5vw, 2.45rem);
  }

  .member-market-strip {
    justify-content: flex-start;
    max-width: 100%;
    width: 100%;
  }

  .member-market-strip span {
    flex: 0 0 auto;
    min-width: 0;
  }

  .mobile-stack,
  .dashboard-grid,
  .split-layout,
  .record-list--cards,
  .metric-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .record-card,
  .record-row,
  .profile-row,
  .detail-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-card-meta {
    align-items: flex-start;
    text-align: left;
  }

  .member-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(5, 6, 8, 0.96);
    box-shadow:
      0 16px 44px rgba(0, 0, 0, 0.46),
      0 0 28px rgba(0, 200, 5, 0.08);
    padding: 6px;
  }

  .member-bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    padding: 7px 4px;
    color: #8c929c;
  }

  .member-bottom-nav button span {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.06);
    color: #c8ced6;
    font-size: 0.72rem;
  }

  .member-bottom-nav button strong {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(0.62rem, 2.5vw, 0.76rem);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .member-bottom-nav button.active {
    border-color: rgba(0, 200, 5, 0.32);
    background: rgba(0, 200, 5, 0.12);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 200, 5, 0.13);
  }

  .member-bottom-nav button.active span {
    background: rgba(0, 200, 5, 0.14);
    color: #00c805;
    text-shadow: 0 0 12px rgba(0, 200, 5, 0.55);
  }
}

:root {
  --trade-green: #00e676;
  --trade-cyan: #23d5ff;
  --trade-blue: #6aa8ff;
  --trade-gold: #f2bf4b;
  --trade-red: #ff526f;
  --trade-panel: rgba(12, 15, 20, 0.98);
  --trade-panel-soft: rgba(255, 255, 255, 0.045);
  --trade-border: rgba(255, 255, 255, 0.09);
}

.trading-terminal {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.trading-terminal--compact {
  gap: 10px;
}

.trading-terminal--compact .panel {
  padding: 12px;
}

.trading-terminal--compact .trading-desk,
.trading-terminal--compact .trading-chart-column,
.trading-terminal--compact .trading-workbench {
  gap: 10px;
}

.trading-terminal--compact .trading-chart-canvas svg {
  min-height: 208px;
}

.trading-terminal--compact .trading-watch-row,
.trading-terminal--compact .trading-mover-row,
.trading-terminal--compact .trading-position-row,
.trading-terminal--compact .trading-open-order-row,
.trading-terminal--compact .trading-activity-row,
.trading-terminal--compact .trading-leaderboard-row {
  padding: 8px;
}

.trading-terminal--compact .trading-detail-grid {
  gap: 6px;
}

.trading-command-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.52fr) minmax(300px, 1fr) minmax(190px, 0.68fr) minmax(120px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 76% 20%, rgba(35, 213, 255, 0.08), transparent 26%),
    linear-gradient(135deg, rgba(18, 24, 31, 0.98), rgba(3, 4, 6, 0.98));
}

.trading-command-bar h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.45rem;
}

.trading-command-bar p {
  margin: 3px 0 0;
  color: #8f97a4;
  font-weight: 800;
}

.trading-mode-rail,
.trading-stat-strip,
.trading-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.trading-mode-rail {
  flex-wrap: wrap;
  justify-content: center;
}

.trading-mode-rail button,
.trading-row-actions button {
  min-height: 32px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #a9b1bd;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 9px;
}

.trading-mode-rail button.active,
.trading-menu-item.active {
  border-color: rgba(0, 230, 118, 0.34);
  background: rgba(0, 230, 118, 0.12);
  color: #ffffff;
  box-shadow:
    0 0 18px rgba(0, 230, 118, 0.12),
    inset 0 0 18px rgba(0, 230, 118, 0.05);
}

.trading-stat-strip {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.trading-stat-strip span {
  display: grid;
  gap: 1px;
  min-width: 74px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 7px 9px;
}

.trading-stat-strip small,
.trading-ticket-note,
.trading-input-block span {
  color: #8f97a4;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trading-stat-strip strong {
  color: #ffffff;
  font-size: 0.84rem;
}

.trading-command-menu-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.trading-command-menu-wrap .trading-menu-trigger {
  min-width: 152px;
}

.trading-menu,
.trading-action-menu {
  position: relative;
  min-width: 0;
}

.trading-menu-trigger,
.trading-action-trigger {
  display: inline-grid;
  align-content: center;
  gap: 1px;
  min-height: 34px;
  min-width: 96px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  font-weight: 900;
  padding: 6px 9px;
  text-align: left;
}

.trading-menu-trigger span,
.trading-menu-item em {
  color: #8f97a4;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.trading-menu-trigger strong {
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trading-menu--open > .trading-menu-trigger,
.trading-action-menu--open > .trading-action-trigger {
  border-color: rgba(35, 213, 255, 0.32);
  background: rgba(35, 213, 255, 0.1);
  box-shadow: 0 0 18px rgba(35, 213, 255, 0.12);
}

.trading-dropdown-menu,
.trading-action-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  min-width: 210px;
  max-width: min(320px, 80vw);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 8%, rgba(35, 213, 255, 0.08), transparent 30%),
    rgba(5, 7, 10, 0.98);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(35, 213, 255, 0.08);
  padding: 8px;
}

.trading-action-popover {
  right: 0;
  min-width: 180px;
}

.trading-command-menu-wrap .trading-dropdown-menu {
  min-width: 300px;
}

.trading-command-menu-wrap .trading-menu-item {
  grid-template-columns: minmax(150px, 1fr) minmax(92px, auto);
}

.trading-command-menu-wrap .trading-menu-item span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.trading-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 8px 9px;
  text-align: left;
}

.trading-menu-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.trading-menu-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trading-desk {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(380px, 1.5fr) minmax(290px, 0.9fr);
  gap: 14px;
  min-width: 0;
}

.trading-section-panel {
  opacity: 0.72;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.trading-terminal--section-markets .trading-section-panel--markets,
.trading-terminal--section-trade .trading-section-panel--trade,
.trading-terminal--section-portfolio .trading-section-panel--portfolio,
.trading-terminal--section-activity .trading-section-panel--activity,
.trading-terminal--section-competition .trading-section-panel--competition {
  opacity: 1;
  transform: translateY(-2px);
}

.trading-terminal--section-markets .trading-section-panel--markets,
.trading-terminal--section-trade .trading-ticket,
.trading-terminal--section-portfolio .trading-section-panel--portfolio,
.trading-terminal--section-activity .trading-section-panel--activity,
.trading-terminal--section-competition .trading-section-panel--competition {
  border-color: rgba(35, 213, 255, 0.24);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(35, 213, 255, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trading-terminal--section-trade .trading-chart-column > .panel {
  border-color: rgba(35, 213, 255, 0.22);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(35, 213, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trading-terminal--section-markets .trading-mode-rail [data-trading-section="markets"],
.trading-terminal--section-trade .trading-mode-rail [data-trading-section="trade"],
.trading-terminal--section-portfolio .trading-mode-rail [data-trading-section="portfolio"],
.trading-terminal--section-activity .trading-mode-rail [data-trading-section="activity"],
.trading-terminal--section-competition .trading-mode-rail [data-trading-section="competition"] {
  border-color: rgba(0, 230, 118, 0.34);
  background: rgba(0, 230, 118, 0.12);
  color: #ffffff;
}

.trading-market-panel,
.trading-chart-column,
.trading-ticket,
.trading-workbench > .panel {
  min-width: 0;
}

.trading-chart-column {
  display: grid;
  gap: 14px;
}

.trading-search {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.trading-search span {
  color: #8f97a4;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trading-search input,
.trading-input-block input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  color: #ffffff;
  font-weight: 850;
  outline: none;
  padding: 10px 11px;
}

.trading-search input:focus,
.trading-input-block input:focus {
  border-color: rgba(35, 213, 255, 0.38);
  box-shadow: 0 0 22px rgba(35, 213, 255, 0.11);
}

.trading-input-block input:disabled {
  color: #6f7784;
  background: rgba(255, 255, 255, 0.035);
}

.trading-watchlist,
.trading-mini-section,
.trading-order-list,
.trading-activity-list,
.trading-position-list,
.trading-leaderboard {
  display: grid;
  gap: 8px;
}

.trading-watch-row,
.trading-mover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(78px, auto);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #f5f7fa;
  padding: 10px;
  text-align: left;
}

.trading-watch-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px;
}

.trading-watch-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, auto) 58px 42px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px;
  text-align: left;
}

.trading-watch-row.active,
.trading-mover-row:hover {
  border-color: rgba(35, 213, 255, 0.24);
  background: rgba(35, 213, 255, 0.07);
  box-shadow: 0 0 22px rgba(35, 213, 255, 0.08);
}

.trading-watch-row strong,
.trading-watch-row small,
.trading-watch-row em,
.trading-mover-row strong,
.trading-mover-row span,
.trading-mover-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trading-watch-row small,
.trading-watch-row em,
.trading-mover-row span {
  color: #8f97a4;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.trading-watch-price {
  text-align: right;
}

.trading-watch-row .trading-action-trigger {
  min-width: 58px;
  min-height: 32px;
  padding: 5px 7px;
  text-align: center;
}

.trading-watch-row .trading-action-trigger,
.trading-watch-row .trading-action-trigger span {
  font-size: 0.68rem;
}

.trading-watch-row .trading-action-popover {
  min-width: 220px;
}

.trading-mini-line {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  height: 30px;
}

.trading-mini-line i {
  display: block;
  width: 4px;
  border-radius: 2px;
  opacity: 0.85;
}

.trading-mini-line i.up {
  background: rgba(0, 230, 118, 0.74);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.18);
}

.trading-mini-line i.down {
  background: rgba(255, 82, 111, 0.74);
  box-shadow: 0 0 10px rgba(255, 82, 111, 0.18);
}

.trading-mini-section {
  margin-top: 16px;
}

.trading-mover-row {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.trading-quote-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 92% 10%, rgba(0, 230, 118, 0.11), transparent 30%),
    linear-gradient(135deg, rgba(19, 22, 28, 0.98), rgba(8, 10, 14, 0.98));
}

.trading-quote-panel h3 {
  margin: 2px 0 0;
  font-size: 2.05rem;
}

.trading-quote-panel p {
  margin: 3px 0 0;
}

.trading-price-block {
  display: grid;
  gap: 2px;
  min-width: 160px;
  text-align: right;
}

.trading-price-block strong {
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
}

.trading-price-block span,
.trading-price-block small {
  font-weight: 900;
}

.trading-price-block small {
  color: #8f97a4;
}

.trading-chart-panel {
  padding: 12px;
}

.trading-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.trading-chart-toolbar .trading-menu,
.trading-chart-settings-trigger {
  flex: 1 1 118px;
}

.trading-chart-toolbar .trading-menu-trigger,
.trading-chart-settings-trigger {
  width: 100%;
}

.trading-chart-canvas {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background:
    radial-gradient(circle at 15% 15%, rgba(35, 213, 255, 0.08), transparent 28%),
    rgba(0, 0, 0, 0.22);
}

.trading-chart-canvas svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 248px;
}

.chart-bg {
  fill: rgba(0, 0, 0, 0.12);
}

.chart-axis {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.2;
}

.chart-grid {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-dasharray: 4 7;
  stroke-width: 1;
}

.chart-label {
  fill: #8f97a4;
  font-size: 12px;
  font-weight: 800;
}

.chart-line {
  fill: none;
  stroke: var(--chart-line, var(--trade-green));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 9px rgba(0, 230, 118, 0.24));
}

.chart-indicator-sma,
.chart-indicator-ema {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chart-indicator-sma {
  stroke: var(--trade-gold);
}

.chart-indicator-ema {
  stroke: var(--trade-cyan);
}

.chart-candle-up,
.chart-candle-down {
  stroke-width: 1.5;
}

.chart-candle-up,
.chart-candle-up-fill,
.chart-volume-up {
  stroke: var(--trade-green);
  fill: var(--trade-green);
}

.chart-candle-down,
.chart-candle-down-fill,
.chart-volume-down {
  stroke: var(--trade-red);
  fill: var(--trade-red);
}

.chart-volume-up,
.chart-volume-down {
  opacity: 0.34;
}

.chart-pattern-support,
.chart-pattern-resistance {
  stroke-dasharray: 7 6;
  stroke-width: 1.8;
}

.chart-pattern-support {
  stroke: rgba(0, 230, 118, 0.58);
}

.chart-pattern-resistance {
  stroke: rgba(242, 191, 75, 0.66);
}

.chart-crosshair {
  stroke: rgba(35, 213, 255, 0.68);
  stroke-dasharray: 3 5;
  stroke-width: 1.2;
}

.chart-crosshair-dot {
  fill: var(--trade-green);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.42));
}

.trading-chart-badges {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.trading-chart-badges span,
.trading-ready,
.trading-warning {
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.48);
  color: #cbd2dc;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 7px 9px;
}

.trading-chart-readout {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  gap: 2px;
  max-width: min(420px, calc(100% - 24px));
  border: 1px solid rgba(35, 213, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.54);
  box-shadow: 0 0 24px rgba(35, 213, 255, 0.08);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 8px 10px;
  pointer-events: none;
}

.trading-chart-readout span {
  color: #8f97a4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.trading-metric {
  min-width: 0;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px;
}

.trading-metric span {
  display: block;
  color: #8f97a4;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trading-metric strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: #ffffff;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.trading-metric--positive strong,
.positive-text {
  color: var(--trade-green) !important;
  text-shadow: 0 0 14px rgba(0, 230, 118, 0.22);
}

.trading-metric--negative strong,
.negative-text {
  color: var(--trade-red) !important;
  text-shadow: 0 0 14px rgba(255, 82, 111, 0.18);
}

.trading-ticket {
  align-self: start;
  position: sticky;
  top: 14px;
  padding: 14px;
}

.trading-ticket .panel-heading {
  align-items: start;
}

.trading-order-preview-trigger {
  min-width: 128px;
}

.trading-ticket-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.trading-ticket-menu-grid .trading-menu {
  width: 100%;
}

.trading-ticket-menu-grid .trading-menu:nth-child(5) {
  grid-column: 1 / -1;
}

.trading-ticket-menu-grid .trading-menu-trigger {
  width: 100%;
}

.trading-ticket-menu-grid .trading-dropdown-menu {
  min-width: 240px;
}

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

.trading-input-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.trading-input-block:nth-child(1),
.trading-input-block:nth-child(5) {
  grid-column: 1 / -1;
}

.trading-ready {
  margin: 12px 0;
  border-color: rgba(0, 230, 118, 0.22);
  color: var(--trade-green);
  background: rgba(0, 230, 118, 0.07);
}

.trading-warning {
  margin: 12px 0;
  border-color: rgba(255, 82, 111, 0.28);
  color: #ffc6d1;
  background: rgba(255, 82, 111, 0.08);
}

.trading-place-order {
  width: 100%;
}

.trading-ticket-note {
  margin: 10px 0 0;
  line-height: 1.45;
  text-transform: none;
}

.trading-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(250px, 0.85fr) minmax(300px, 1fr) minmax(240px, 0.78fr);
  gap: 14px;
  min-width: 0;
}

.portfolio-sparkline {
  display: block;
  width: 100%;
  height: 82px;
  margin-bottom: 10px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.portfolio-sparkline polyline {
  fill: none;
  stroke: var(--trade-cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
  filter: drop-shadow(0 0 8px rgba(35, 213, 255, 0.25));
}

.trading-position-list,
.trading-order-list,
.trading-activity-list {
  margin-top: 12px;
}

.trading-position-row,
.trading-open-order-row,
.trading-activity-row,
.trading-leaderboard-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.trading-position-row {
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) auto;
}

.trading-position-row strong,
.trading-position-row span,
.trading-open-order-row strong,
.trading-open-order-row span,
.trading-activity-row strong,
.trading-activity-row span,
.trading-leaderboard-row strong,
.trading-leaderboard-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trading-position-row span,
.trading-open-order-row span,
.trading-activity-row span {
  color: #8f97a4;
  font-size: 0.78rem;
  font-weight: 800;
}

.allocation-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.allocation-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--trade-green), var(--trade-cyan));
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.18);
}

.trading-open-order-row {
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto) auto;
}

.trading-action-trigger {
  min-width: 74px;
  min-height: 31px;
  color: #dfe6ef;
  font-size: 0.76rem;
  text-align: center;
}

.trading-activity-row {
  grid-template-columns: 10px minmax(0, 1fr) minmax(110px, auto);
}

.trading-activity-row i {
  width: 8px;
  height: 36px;
  border-radius: 999px;
}

.trading-activity-row i.positive {
  background: var(--trade-green);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.26);
}

.trading-activity-row i.negative {
  background: var(--trade-red);
}

.trading-activity-row i.neutral {
  background: var(--trade-gold);
}

.trading-competition-hero {
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 18%, rgba(0, 230, 118, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.trading-competition-hero strong {
  display: block;
  color: var(--trade-green);
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 230, 118, 0.28);
}

.trading-competition-hero p {
  margin: 5px 0 0;
}

.trading-leaderboard {
  margin-top: 12px;
}

.trading-leaderboard-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.trading-leaderboard-row.active {
  border-color: rgba(35, 213, 255, 0.26);
  background: rgba(35, 213, 255, 0.08);
}

.trading-leaderboard-row span,
.trading-leaderboard-row em {
  color: #8f97a4;
  font-style: normal;
  font-weight: 900;
}

.trading-chart-empty {
  display: grid;
  place-items: center;
  min-height: 244px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  color: #8f97a4;
  font-weight: 900;
}

.trading-detail-drawer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  display: grid;
  gap: 12px;
  width: min(340px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(35, 213, 255, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(35, 213, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(16, 20, 27, 0.98), rgba(4, 6, 9, 0.99));
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.62),
    0 0 44px rgba(35, 213, 255, 0.1);
  padding: 14px;
}

.trading-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trading-drawer-header h3 {
  margin: 2px 0 0;
}

.trading-drawer-header button {
  min-height: 30px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #cbd2dc;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 6px 9px;
}

.trading-drawer-stack {
  display: grid;
  gap: 8px;
}

.trading-drawer-section {
  display: grid;
  gap: 8px;
}

.trading-candle-list {
  display: grid;
  gap: 6px;
}

.trading-candle-row {
  display: grid;
  gap: 2px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
}

.trading-candle-row strong,
.trading-candle-row span,
.trading-candle-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trading-candle-row span,
.trading-candle-row em,
.trading-drawer-note {
  color: #8f97a4;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 850;
}

.trading-drawer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trading-drawer-actions button {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 34px;
  border: 1px solid var(--trade-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 9px;
}

.trading-drawer-actions button span {
  color: #8f97a4;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trading-drawer-actions button.active {
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.1);
  box-shadow: inset 0 0 18px rgba(0, 230, 118, 0.05);
}

.trading-drawer-actions button:hover {
  border-color: rgba(0, 230, 118, 0.28);
  background: rgba(0, 230, 118, 0.09);
}

.trading-drawer-note {
  margin: 0;
}

@media (max-width: 1480px) and (min-width: 900px) {
  .trading-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) and (min-width: 900px) {
  .trading-command-bar,
  .trading-desk {
    grid-template-columns: 1fr;
  }

  .trading-ticket {
    position: static;
  }

  .trading-stat-strip,
  .trading-mode-rail {
    justify-content: flex-start;
  }
}

.trading-terminal--section-markets .trading-section-panel:not(.trading-section-panel--markets),
.trading-terminal--section-trade .trading-section-panel:not(.trading-section-panel--trade),
.trading-terminal--section-portfolio .trading-section-panel:not(.trading-section-panel--portfolio),
.trading-terminal--section-activity .trading-section-panel:not(.trading-section-panel--activity),
.trading-terminal--section-competition .trading-section-panel:not(.trading-section-panel--competition) {
  display: none;
}

.trading-terminal--section-markets .trading-workbench,
.trading-terminal--section-trade .trading-workbench,
.trading-terminal--section-portfolio .trading-desk,
.trading-terminal--section-activity .trading-desk,
.trading-terminal--section-competition .trading-desk {
  display: none;
}

.trading-terminal--section-markets .trading-desk,
.trading-terminal--section-portfolio .trading-workbench,
.trading-terminal--section-competition .trading-workbench {
  grid-template-columns: minmax(0, 1fr);
}

.trading-terminal--section-trade .trading-desk {
  grid-template-columns: minmax(520px, 1fr) minmax(290px, 0.48fr);
}

.trading-terminal--section-activity .trading-workbench {
  grid-template-columns: minmax(300px, 0.72fr) minmax(420px, 1.28fr);
}

@media (max-width: 1180px) and (min-width: 900px) {
  .trading-terminal--section-trade .trading-desk,
  .trading-terminal--section-activity .trading-workbench {
    grid-template-columns: 1fr;
  }
}
