:root {
  --bg: #090d12;
  --panel: #0f161d;
  --panel-2: #1a232c;
  --accent: #55e69d;
  --primary: #63aef5;
  --success: #55e69d;
  --warning: #e8bd74;
  --danger: #ed7685;
  --text: #f5f7fa;
  --muted: #8b949e;
  --border: #1d2731;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px calc(94px + env(safe-area-inset-bottom));
  touch-action: pan-y;
}

.app-topbar {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 20;
  width: calc(100% + 32px);
  margin: 0 -16px 22px;
  background: var(--bg);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: margin-bottom 180ms ease, padding-bottom 180ms ease;
}

.header.is-compact {
  padding-bottom: 6px;
}

.header.is-compact .brand-mark {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 8px;
}

.header.is-compact .brand-name {
  font-size: 13px;
  opacity: 0;
}

.header.is-compact .brand-lockup > div {
  max-width: 0;
  max-height: 0;
  opacity: 0;
}

.header.is-compact .account-context-button {
  height: 23px;
  padding-right: 6px;
  padding-left: 6px;
  font-size: 9px;
}

.header.is-compact .account-context-button strong {
  font-size: 9px;
}

.header.is-compact .account-context-stack {
  gap: 1px;
}

.header.is-compact .connection-status {
  margin-top: 7.5px;
}

.header.is-compact .home-open-pnl {
  max-height: 0;
  opacity: 0;
  min-height: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 5px 0 0;
  font-size: 27px;
  line-height: 1.12;
  font-weight: 700;
}

.header-status {
  display: flex;
  align-items: flex-start;
  grid-template-columns: minmax(82px, 0.65fr) minmax(0, 1fr);
  gap: 8px;
  gap: 10px;
}

.account-context-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.home-open-pnl {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  transition: max-height 180ms ease, opacity 140ms ease;
  white-space: nowrap;
}

.home-open-pnl[hidden] {
  display: none;
}

.home-open-pnl-value {
  color: var(--text);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.home-open-pnl-value.positive {
  color: var(--accent);
}

.home-open-pnl-value.negative {
  color: var(--danger);
}

.connection-status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  margin-top: 9px;
  color: var(--status-color, #8b949e);
  line-height: 1;
}

.connection-status[data-mode="demo"] {
  --status-color: #70b9ff;
  --status-ring: rgba(112, 185, 255, 0.2);
  --status-glow: rgba(112, 185, 255, 0.48);
  --status-ring-peak: rgba(112, 185, 255, 0.32);
  --status-glow-peak: rgba(112, 185, 255, 0.72);
}

.connection-status[data-mode="live"] {
  --status-color: #55e69d;
  --status-ring: rgba(85, 230, 157, 0.2);
  --status-glow: rgba(85, 230, 157, 0.48);
  --status-ring-peak: rgba(85, 230, 157, 0.32);
  --status-glow-peak: rgba(85, 230, 157, 0.72);
}

.connection-status[data-mode="offline"] {
  --status-color: #ed7685;
  --status-ring: rgba(237, 118, 133, 0.2);
  --status-glow: rgba(237, 118, 133, 0.48);
  --status-ring-peak: rgba(237, 118, 133, 0.34);
  --status-glow-peak: rgba(237, 118, 133, 0.76);
}

.connection-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px var(--status-ring), 0 0 8px 1px var(--status-glow);
  animation: status-glow-pulse 2.2s ease-in-out infinite;
}

@keyframes status-glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px var(--status-ring), 0 0 8px 1px var(--status-glow);
  }
  50% {
    box-shadow: 0 0 0 4px var(--status-ring-peak), 0 0 14px 3px var(--status-glow-peak);
  }
}

.app-toast {
  position: fixed;
  z-index: 100;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 50%;
  width: min(398px, calc(100vw - 32px));
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 22, 29, 0.98);
  color: var(--text);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.app-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.app-toast[hidden] {
  display: none;
}

.app-toast-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 230, 157, 0.35);
  border-radius: 50%;
  background: rgba(85, 230, 157, 0.12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.app-toast[data-tone="error"] .app-toast-icon {
  border-color: rgba(237, 118, 133, 0.4);
  background: rgba(237, 118, 133, 0.12);
  color: var(--danger);
}

.app-toast-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}

.app-toast-copy strong {
  font-size: 12px;
  line-height: 1.3;
}

.app-toast-copy > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-toast-dismiss {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .connection-status-dot,
  .header,
  .brand-mark,
  .brand-name,
  .account-context-button,
  .home-open-pnl {
    animation: none;
    transition: none;
  }
}

.account-context-button {
  width: auto;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid rgba(139, 148, 158, 0.42);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.account-context-button strong {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.account-context-chevron,
.favorites-toggle-arrow {
  width: 0;
  height: 0;
  display: inline-block;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  color: var(--muted);
  font-size: 0;
  line-height: 0;
  transition: transform 160ms ease;
}

.account-context-chevron {
  margin-left: 1px;
}

.account-context-button:disabled {
  cursor: default;
  opacity: 1;
}

.account-context-button:disabled .account-context-chevron {
  visibility: hidden;
}

.signal-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.row-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.row-row:last-child {
  border-bottom: none;
}

.label {
  color: var(--muted);
}

.confidence-row {
  margin-top: 8px;
  color: var(--accent);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
}

.button-group {
  display: flex;
  margin: 12px 0;
}

button {
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.ghost-button {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
}

.primary {
  background: var(--primary);
}

.success {
  background: var(--success);
  color: #06120c;
}

.hidden {
  display: none;
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel.active {
  display: block;
}

#pairList,
.record-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

#pairList {
  gap: 14px;
}

.pair-option,
.record-list li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 13px;
  color: var(--muted);
}

.pair-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background-color: transparent;
  font-size: 14px;
}

.pair-option.selected {
  font-size: 10px;
  transition: height 180ms ease, padding 180ms ease, font-size 180ms ease;
  background: #111a17;
}

.pair-option strong,
.record-list strong {
  color: var(--text);
}

.pair-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.strategy-panel h2,
.signal-results h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.signal-results {
  margin: 22px 0 16px;
}

.signal-results .section-header {
  align-items: center;
  margin-bottom: 10px;
}

.signal-results .subtle-note {
  display: block;
  margin: 4px 0 0;
}

.pair-score {
  font-weight: 700;
}

.show-more-button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #11161c;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
}

.tab-panel > .panel {
  margin-bottom: 12px;
}

.signal-heading,
.signal-prices,
.signal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signal-heading > div,
.signal-prices > div {
  display: grid;
  gap: 6px;
}

.signal-heading strong {
  font-size: 21px;
  font-weight: 700;
}

.signal-prices {
  align-items: flex-start;
  margin-top: 17px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.signal-prices strong {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.signal-footer {
  margin-top: 12px;
  padding-top: 2px;
}

.status-box {
  background: #111a17;
  border: 1px solid rgba(40, 224, 140, 0.24);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  color: var(--text);
}

.page-section-header {
  margin: 8px 0 16px;
}

.record-list li {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.record-title,
.record-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.record-title strong {
  font-size: 15px;
}

.close-order-button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid rgba(237, 118, 133, 0.32);
  border-radius: 7px;
  background: rgba(237, 118, 133, 0.1);
  color: var(--danger);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.close-order-button:hover:not(:disabled) {
  border-color: rgba(237, 118, 133, 0.55);
  background: rgba(237, 118, 133, 0.16);
}

.close-order-button:disabled {
  opacity: 0.4;
}

.record-pnl.positive {
  color: var(--success);
}

.record-pnl.negative {
  color: var(--danger);
}

.record-line {
  color: var(--muted);
  font-size: 13px;
}

.subtle-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.account-panel {
  margin-top: 12px;
}

.account-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.connection-dot[data-mode="demo"] {
  background: #70b9ff;
  box-shadow: 0 0 7px rgba(112, 185, 255, 0.55);
}

.connection-dot[data-mode="live"] {
  background: var(--success);
  box-shadow: 0 0 7px rgba(85, 230, 157, 0.55);
}

.connection-dot[data-mode="offline"] {
  background: var(--danger);
  box-shadow: 0 0 7px rgba(237, 118, 133, 0.5);
}

.account-details {
  margin: 0;
}

.account-details > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.account-details > div:last-child {
  border-bottom: 0;
}

.account-details dt {
  color: var(--muted);
}

.account-details dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  font-size: 22px;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 440px);
  min-height: 70px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(9, 12, 16, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

@media (max-width: 599px) {
  .bottom-nav {
    transform: translate(-50%, -1px);
  }
}

.nav-tab {
  min-width: 0;
  min-height: 52px;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  color: #66717c;
  font-size: 11px;
}

.nav-tab.active {
  color: var(--accent);
}

.nav-icon {
  height: 23px;
  font-size: 22px;
  line-height: 1;
}

.nav-icon-stonks {
  width: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon-user {
  position: relative;
  width: 23px;
  display: block;
  font-size: 0;
}

.nav-icon-user::before,
.nav-icon-user::after {
  position: absolute;
  left: 50%;
  background: currentColor;
  content: '';
  transform: translateX(-50%);
}

.nav-icon-user::before {
  top: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.nav-icon-user::after {
  bottom: 1px;
  width: 15px;
  height: 9px;
  border-radius: 9px 9px 3px 3px;
}

@media (min-width: 600px) {
  .app-shell {
    padding-top: 28px;
  }

  .bottom-nav {
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }
}

.dashboard-main {
  position: relative;
  display: grid;
  gap: 22px;
  overflow-x: clip;
  touch-action: pan-y;
}

.dashboard-main.is-swiping {
  user-select: none;
}

.tab-panel.swipe-preview {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
}

.dashboard-main.is-swiping > .tab-panel.active {
  position: relative;
  z-index: 2;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: gap 180ms ease;
}

.brand-lockup > div {
  max-width: 80px;
  max-height: 40px;
  min-width: 0;
  overflow: hidden;
  transition: max-width 180ms ease, max-height 180ms ease, opacity 180ms ease;
}

.header.is-compact .brand-lockup {
  gap: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: block;
  border: 1px solid rgba(85, 230, 157, 0.2);
  border-radius: 10px;
  background: #11161c;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(85, 230, 157, 0.18), inset 0 0 0 1px rgba(85, 230, 157, 0.1);
  transition: width 180ms ease, height 180ms ease, flex-basis 180ms ease, border-radius 180ms ease;
}

.brand-lockup .eyebrow {
  color: #78838e;
  font-size: 9px;
}

.brand-name {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  transition: font-size 180ms ease, opacity 180ms ease;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.market-ticker {
  width: min(100%, 430px);
  max-height: 28px;
  overflow: hidden;
  margin: 2px auto 0;
  background: transparent;
  contain: paint;
  opacity: 1;
  transition: max-height 180ms ease, margin-top 180ms ease, opacity 150ms ease;
}

.app-topbar.is-compact .market-ticker {
  max-height: 24px;
  margin-top: 1px;
}

.market-ticker[hidden] {
  display: none;
}

.market-ticker-track,
.ticker-group {
  display: flex;
  width: max-content;
}

.market-ticker-track {
  animation: ticker-right 80s linear infinite;
  will-change: transform;
}

.market-ticker:hover .market-ticker-track,
.market-ticker:focus-within .market-ticker-track {
  animation-play-state: paused;
}

.ticker-group {
  flex: 0 0 auto;
  align-items: center;
}

.ticker-item {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  white-space: nowrap;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  transition: min-height 180ms ease, gap 180ms ease, padding 180ms ease, font-size 180ms ease;
}

.app-topbar.is-compact .ticker-item {
  min-height: 24px;
  gap: 5px;
  padding-right: 9px;
  padding-left: 9px;
  font-size: 9px;
}

.ticker-symbol {
  color: var(--text);
  font-weight: 600;
}

.ticker-change {
  font-weight: 700;
}

.ticker-change.positive {
  color: var(--accent);
}

.ticker-change.negative {
  color: var(--danger);
}

.ticker-change.flat {
  color: var(--muted);
}

@keyframes ticker-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-ticker-track {
    animation: none;
  }

  .header,
  .brand-lockup,
  .brand-lockup > div,
  .brand-mark,
  .brand-name,
  .account-context-button,
  .home-open-pnl,
  .market-ticker,
  .ticker-item,
  .app-toast {
    transition: none;
  }
}

.welcome-section,
.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 22px;
}

.welcome-section h1,
.page-intro h1 {
  margin: 3px 0 6px;
  font-size: 25px;
  line-height: 1.18;
}

.welcome-copy {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-kicker {
  margin: 0 0 5px;
  color: #71808b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 9px;
  border: 1px solid rgba(40, 224, 140, 0.25);
  border-radius: 18px;
  background: rgba(40, 224, 140, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(40, 224, 140, 0.7);
}

.live-indicator.is-closed,
.live-indicator.is-unavailable {
  border-color: var(--border);
  background: #151a20;
  color: var(--muted);
}

.live-indicator.is-closed .live-dot,
.live-indicator.is-unavailable .live-dot {
  background: var(--muted);
  box-shadow: none;
}

.section-heading {
  margin-bottom: 12px;
}

.potential-signals-heading {
  margin-bottom: 16px;
}

.section-heading h2,
.signal-results h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.favorites-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.favorites-toggle > span:first-child {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.favorites-toggle[aria-expanded="true"] .favorites-toggle-arrow {
  transform: rotate(180deg);
}

.text-action {
  padding: 6px 0 6px 8px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.text-action span,
.account-link-value b {
  padding-left: 4px;
  font-size: 18px;
  line-height: 0.8;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.filter-control {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.filter-control select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.filter-pills {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 0;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pills .market-button,
.filter-pills .strategy-button {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 11px;
}

.filter-pills .strategy-button {
  min-width: 70px;
}

.signal-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.signal-list[hidden] {
  display: none;
}

.signal-option {
  display: grid;
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  transition: gap 260ms ease;
}

.signal-option.is-chart-open,
.signal-option.is-chart-closing {
  gap: 4px;
}

.signal-option:hover {
  border-color: rgba(40, 224, 140, 0.38);
  background: #111813;
}

.signal-option-top,
.signal-option-footer,
.signal-symbol-block,
.signal-levels,
.signal-level {
  display: flex;
}

.signal-option-top,
.signal-option-footer {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signal-pair-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.favorite-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111820;
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
}

.favorite-toggle:hover,
.favorite-toggle.is-favorite {
  border-color: rgba(232, 189, 116, 0.42);
  color: var(--warning);
}

.signal-symbol-block {
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.signal-symbol-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--symbol-outline, var(--border));
  border-radius: 8px;
  background: #1a222a;
  color: #c1ccd4;
  font-size: 13px;
  font-weight: 700;
}

.signal-symbol-mark.market-forex {
  --symbol-outline: #63aef5;
}

.signal-symbol-mark.market-metals {
  --symbol-outline: #e8bd74;
}

.signal-symbol-mark.market-crypto {
  --symbol-outline: #f39a5b;
}

.signal-symbol-mark.market-indices {
  --symbol-outline: #55e69d;
}

.signal-symbol-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.signal-symbol-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-symbol-copy small,
.signal-option-footer {
  color: var(--muted);
  font-size: 10px;
}

.signal-new-badge {
  margin-left: 5px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(40, 224, 140, 0.11);
  color: var(--accent);
  font-size: 8px;
  vertical-align: 1px;
}

.signal-side-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(40, 224, 140, 0.2);
  border-radius: 8px;
  background: rgba(40, 224, 140, 0.07);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.signal-side-badge.sell {
  border-color: rgba(255, 104, 123, 0.22);
  background: rgba(255, 104, 123, 0.07);
  color: var(--danger);
}

.signal-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  max-height: 64px;
  overflow: hidden;
  padding: 11px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  opacity: 1;
  transform: translateY(0);
  transition: max-height 240ms ease, opacity 180ms ease, transform 240ms ease, padding 240ms ease, border-width 240ms ease;
}

.signal-risk-control {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 2px 0 0;
}

.signal-risk-ticks {
  position: relative;
  height: 12px;
  margin: 0 6px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.signal-risk-ticks span {
  position: absolute;
  top: 0;
  left: calc(var(--risk-stop-index) * 100% / 3);
  white-space: nowrap;
  transform: translateX(-50%);
}

.signal-risk-slider {
  width: 100%;
  height: 14px;
  display: block;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

.signal-risk-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--border), var(--accent));
}

.signal-risk-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--border), var(--accent));
}

.signal-risk-slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  appearance: none;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(85, 230, 157, 0.5);
}

.signal-risk-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(85, 230, 157, 0.5);
}

.signal-risk-caption {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.signal-risk-caption small {
  color: var(--muted);
  font-size: 8px;
}

.signal-risk-value {
  overflow: hidden;
  color: var(--text);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-levels[hidden],
.signal-option-footer[hidden] {
  display: none;
}

.signal-level {
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.signal-level small {
  color: #75818b;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.signal-level strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.signal-option-footer {
  max-height: 28px;
  overflow: hidden;
  opacity: 1;
  font-variant-numeric: tabular-nums;
  transform: translateY(0);
  transition: max-height 240ms ease, opacity 180ms ease, transform 240ms ease;
}

.signal-option.is-chart-open .signal-levels,
.signal-option.is-chart-open .signal-option-footer {
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.signal-option.is-chart-closing .signal-levels {
  transition-delay: 0ms;
}

.signal-option.is-chart-closing .signal-option-footer {
  transition-delay: 55ms;
}

.signal-level.take-profit strong {
  color: var(--accent);
}

.signal-level.stop-loss strong {
  color: var(--danger);
}

.signal-trade-actions {
  display: grid;
  grid-template-columns: minmax(82px, 0.65fr) minmax(0, 1fr);
  gap: 8px;
}

.chart-toggle-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(139, 148, 158, 0.42);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chart-toggle-button:hover,
.chart-toggle-button.is-active {
  border-color: rgba(139, 148, 158, 0.7);
  background: #222c36;
  color: var(--text);
}

.signal-chart-panel {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  border-top: 1px solid transparent;
  opacity: 0;
  transform: translateY(18px);
  transition: max-height 300ms ease, opacity 220ms ease, transform 300ms ease, padding-top 260ms ease, border-color 220ms ease;
}

.signal-option.is-chart-open .signal-chart-panel {
  max-height: 360px;
  padding-top: 9px;
  border-top-color: var(--border);
  opacity: 1;
  transform: translateY(0);
}

.signal-chart-panel[hidden] {
  display: none;
}

.signal-chart-message {
  display: block;
  min-height: 13px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.signal-chart-message[hidden] {
  display: none;
}

.signal-chart-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 7px;
}

.signal-chart-levels[hidden] {
  display: none;
}

.signal-chart-level {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.signal-chart-level small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.signal-chart-level strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.signal-chart-level.take-profit strong {
  color: var(--accent);
}

.signal-chart-level.stop-loss strong {
  color: var(--danger);
}

.signal-chart-canvas {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
}

.signal-chart-markers {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.signal-chart-markers[hidden] {
  display: none;
}

.signal-chart-marker {
  position: absolute;
  left: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  transform: translateY(-50%);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(9, 13, 18, 0.92);
  color: var(--text);
  font-size: 9px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.signal-chart-marker small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.signal-chart-marker.entry strong {
  color: #cbd5df;
}

.signal-chart-marker.take-profit strong {
  color: var(--accent);
}

.signal-chart-marker.stop-loss strong {
  color: var(--danger);
}

.signal-chart-watermark {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(245, 247, 250, 0.12);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

.signal-chart-attribution {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin-top: 4px;
  color: #707b86;
  font-size: 8px;
  line-height: 1.3;
  text-align: right;
}

.signal-chart-attribution a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trade-button {
  width: 100%;
  min-height: 42px;
  max-height: 42px;
  overflow: hidden;
  border: 1px solid rgba(85, 230, 157, 0.55);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent);
  color: #062316;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 220ms ease, min-height 220ms ease, opacity 180ms ease, transform 220ms ease, padding 220ms ease, border-width 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .signal-option,
  .signal-levels,
  .signal-option-footer,
  .signal-chart-panel,
  .trade-button {
    transition: none;
  }
}

.signal-potential {
  position: relative;
  width: 96px;
  height: 4px;
  flex: 0 0 96px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #ed7685 0%, #e8bd74 52%, #55e69d 100%);
}

.potential-group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.signal-potential::after {
  position: absolute;
  top: 50%;
  left: clamp(5px, var(--potential-position), calc(100% - 5px));
  width: 10px;
  height: 10px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 1px rgba(245, 247, 250, 0.32);
  content: '';
  transform: translate(-50%, -50%);
}

.confluence-button {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.confluence-button > span:last-child {
  font-size: 16px;
  line-height: 1;
}

.confluence-dialog {
  width: min(390px, calc(100% - 32px));
  max-height: min(78dvh, 680px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.confluence-dialog[open] {
  animation: confluence-dialog-in 180ms ease-out;
}

.confluence-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

@keyframes confluence-dialog-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.confluence-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.confluence-dialog-symbol {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
}

.confluence-dialog h2 {
  margin: 0;
  font-size: 18px;
}

.confluence-dialog-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 20px;
}

.confluence-count {
  display: block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 13px;
}

.confluence-intro {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.confluence-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.confluence-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.confluence-item-status {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.confluence-item.is-confirmed .confluence-item-status {
  border-color: rgba(85, 230, 157, 0.4);
  background: rgba(85, 230, 157, 0.1);
  color: var(--accent);
}

.confluence-item > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.confluence-item strong {
  font-size: 12px;
  line-height: 1.35;
}

.confluence-item small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.page-intro {
  display: grid;
  gap: 4px;
  margin: 8px 0 20px;
}

.page-intro .section-kicker {
  margin-bottom: 2px;
}

.orders-page-intro {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.active-orders-pnl {
  color: var(--muted);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.active-orders-pnl.positive {
  color: var(--accent);
}

.active-orders-pnl.negative {
  color: var(--danger);
}

.position-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  margin-top: 8px;
}

.position-detail-grid > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.position-detail-grid span {
  color: var(--muted);
  font-size: 9px;
}

.position-detail-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-filters {
  margin-bottom: 20px;
}

.signal-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signal-list-heading .subtle-note {
  display: block;
  margin: 4px 0 0;
}

.results-label {
  color: var(--muted);
  font-size: 10px;
}

.home-signals > .status-box {
  margin: 12px 0 0;
}

.home-favorites {
  margin-bottom: 24px;
}

.trade-confirm-dialog {
  width: min(380px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.trade-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.account-picker-dialog {
  width: min(390px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.account-picker-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.account-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.account-picker-dialog h2 {
  margin: 0;
  font-size: 18px;
}

.account-choice-view[hidden],
.account-login-view[hidden] {
  display: none;
}

.account-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 14px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111820;
}

.account-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-mode-switch button.is-selected {
  background: rgba(85, 230, 157, 0.14);
  color: var(--accent);
}

.account-picker-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.account-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.account-choice-row {
  position: relative;
  min-width: 0;
}

.account-choice {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px 42px 11px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111820;
  color: var(--text);
  text-align: left;
}

.account-choice.is-selected {
  border-color: rgba(85, 230, 157, 0.48);
  background: rgba(85, 230, 157, 0.08);
}

.account-choice strong {
  font-size: 12px;
}

.account-choice span {
  color: var(--muted);
  font-size: 10px;
}

.account-choice .account-choice-equity {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.account-choice-loading {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.account-choice-remove {
  position: absolute;
  top: 5px;
  right: 8px;
  min-width: 28px;
  min-height: 28px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
}

.account-add-button,
.account-add-submit {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(85, 230, 157, 0.42);
  border-radius: 8px;
  background: rgba(85, 230, 157, 0.1);
  color: var(--accent);
  font-weight: 700;
}

.account-add-button {
  margin-top: 12px;
}

.account-add-form {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.account-add-form[hidden],
.account-add-button[hidden],
.account-add-status[hidden] {
  display: none;
}

.account-add-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.account-add-form label[hidden] {
  display: none;
}

.account-add-form label span {
  display: inline;
  color: var(--muted);
  font-weight: 400;
}

.account-add-form input {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  background: #111820;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.account-add-form input:focus {
  border-color: var(--accent);
}

.account-add-note,
.account-add-status {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}

.account-add-note {
  color: var(--muted);
}

.account-add-status {
  color: var(--danger);
}

.account-add-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.account-add-cancel {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
}

.account-picker-close {
  flex: 0 0 32px;
  width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.account-remove-dialog {
  width: min(360px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.account-remove-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.account-remove-dialog h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.account-remove-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-remove-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.account-remove-actions button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
}

.account-remove-confirm {
  background: var(--danger);
  color: #15191f;
}

.account-remove-cancel {
  background: var(--panel-2);
  color: var(--text);
}

.trade-confirm-dialog h2 {
  margin: 8px 0;
  font-size: 18px;
}

.trade-confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.skip-confirmation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
}

.skip-confirmation[hidden] {
  display: none;
}

.skip-confirmation input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.trade-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.trade-confirm-actions button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
}

.trade-confirm-actions .cancel {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
}

.trade-confirm-actions .close-order-confirm {
  background: var(--danger);
  color: #26070c;
}

.orders-status {
  margin: 0 0 12px;
}

.account-summary,
.pnl-card {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.account-broker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.broker-monogram {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #192129;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.broker-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.broker-copy h2 {
  margin: 0;
  font-size: 14px;
}

.broker-copy .account-state {
  padding: 0;
  border: 0;
  font-size: 9px;
}

.account-id {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.account-id strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.broker-copy .connection-dot {
  width: 6px;
  height: 6px;
}

.account-server-caption {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-equity-value {
  display: block;
  margin-bottom: 3px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.account-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.account-meta-grid > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.account-meta-grid span {
  color: #75818b;
  font-size: 8px;
  font-weight: 600;
}

.account-meta-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-card .section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pnl-total {
  color: var(--accent);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.pnl-total.negative {
  color: var(--danger);
}

.pnl-total-wrap {
  min-width: 0;
  text-align: right;
}

.pnl-selected-time {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.pnl-selected-time[hidden] {
  display: none;
}

.pnl-chart {
  height: 132px;
  padding: 8px 0 0;
}

.pnl-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.pnl-grid-line {
  stroke: var(--border);
  stroke-width: 1;
}

.pnl-zero-line {
  stroke: #62717d;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.pnl-axis-label {
  fill: var(--muted);
  font-size: 9px;
  dominant-baseline: middle;
}

.pnl-area {
  fill: url(#pnlAreaGradient);
}

.pnl-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.pnl-point {
  fill: var(--accent);
}

.pnl-crosshair {
  stroke: #aab6bf;
  stroke-dasharray: 3 3;
  stroke-width: 1;
  pointer-events: none;
}

.pnl-hover-point {
  fill: var(--accent);
  stroke: var(--panel);
  stroke-width: 2;
  pointer-events: none;
}

.pnl-hover-point.negative {
  fill: var(--danger);
}

.pnl-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.pnl-periods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
}

.pnl-periods button {
  padding: 7px 3px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.pnl-periods button.active {
  border-color: rgba(40, 224, 140, 0.25);
  background: rgba(40, 224, 140, 0.08);
  color: var(--accent);
}

.account-link-card {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  scroll-margin-bottom: calc(94px + env(safe-area-inset-bottom));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.account-link-card > span:first-child {
  display: grid;
  gap: 4px;
}

.account-link-card small {
  color: #75818b;
  font-size: 8px;
  font-weight: 600;
}

.account-link-card strong {
  font-size: 12px;
}

.account-link-value {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.account-link-value b {
  color: var(--accent);
}

.page-back-link {
  margin-top: 15px;
  scroll-margin-bottom: calc(94px + env(safe-area-inset-bottom));
}

@media (max-width: 360px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .signal-option {
    padding: 11px;
  }

}
