.chip {
  user-select: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text-color);
  font-size: 13px;
  letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(5, 12, 20, .25);
  transition: transform .2s ease, border .2s ease, background .25s ease, box-shadow .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip span {
  font-size: 11px;
  opacity: .75;
}

.chip.unavailable {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  opacity: .85;
}

.chip__warning {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .3px;
  text-transform: uppercase;
}

.chip.active {
  background: var(--chip-active);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(59, 199, 196, .2);
}

.chip.special {
  border-style: dashed;
  opacity: .85;
}

.chip.disabled {
  cursor: not-allowed;
  opacity: .55;
  filter: saturate(.6);
  background: rgba(255,255,255,.04);
  border-style: dotted;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(5, 14, 24, .35);
}

body[data-theme="day"] .chip,
body[data-theme="day"] .pattern-pill,
body[data-theme="day"] .tf-pill,
body[data-theme="day"] .toolbar button,
body[data-theme="day"] .card-tools button {
  color: #101828;
  background: #F2F4F7;
  border-color: #D0D5DD;
  box-shadow: 0 6px 14px rgba(16,24,40,.08);
}

body[data-theme="day"] .chip.active,
body[data-theme="day"] .toolbar button.active,
body[data-theme="day"] .card-tools button.active {
  background: rgba(37,99,235,.1);
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 8px 16px rgba(16,24,40,.1);
}

body[data-theme="day"] .chip:hover,
body[data-theme="day"] .toolbar button:hover:not(:disabled),
body[data-theme="day"] .card-tools button:hover:not(:disabled) {
  box-shadow: 0 10px 20px rgba(16,24,40,.12);
}

.insight-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insight-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.insight-card strong {
  font-size: 20px;
}

.insight-card small {
  font-size: 12px;
  color: var(--muted);
}

.card {
  position: relative;
  --tz: 0px;
  --card-border: rgba(255, 215, 0, 0.32);
  --card-ambient: rgba(255, 215, 0, 0.18);
  --card-radar: rgba(255, 215, 0, 0.42);
  --card-radar-glow: rgba(255, 215, 0, 0.12);
  --card-radar-sweep: rgba(255, 215, 0, 0.22);
  --card-radar-ping: rgba(0, 243, 255, 0.35);
  --card-progress-tp: rgba(0, 255, 157, 0.82);
  --card-progress-sl: rgba(255, 95, 127, 0.82);
  --card-shadow: 0 22px 50px rgba(2, 6, 14, 0.7);
  border-radius: 26px;
  padding: 18px 20px 22px;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 215, 0, 0.16), transparent 48%),
    radial-gradient(circle at 85% 0%, rgba(0, 243, 255, 0.08), transparent 46%),
    linear-gradient(160deg, rgba(5, 7, 12, 0.98), rgba(2, 4, 8, 0.95));
  border: 1px solid color-mix(in srgb, var(--card-border) 75%, rgba(8, 12, 18, 0.85));
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(18px) saturate(160%);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .3s ease;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 520px 460px;
}

.soundtok-eq {
  width: 100%;
  height: 22px;
  border-radius: 10px;
  border: 1px solid rgba(59, 199, 196, 0.2);
  background: rgba(6, 16, 26, 0.45);
  opacity: 0.55;
}

body[data-theme="day"] .soundtok-eq {
  background: rgba(236, 244, 255, 0.72);
  border-color: rgba(37, 99, 235, 0.25);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--card-ambient) 70%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 90% 92%, color-mix(in srgb, var(--card-ambient) 55%, transparent) 0%, transparent 46%);
  opacity: .75;
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card[data-stage="candidate"] {
  --card-shadow: 0 20px 42px rgba(5,14,24,.55);
}

.card[data-stage="signal"] {
  --card-shadow: 0 24px 48px rgba(6,16,28,.58);
}

.card.completed-tp {
  --card-shadow: 0 20px 46px rgba(24,68,50,.5);
}

.card.completed-sl {
  --card-shadow: 0 20px 46px rgba(68,26,34,.5);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
  border-color: color-mix(in srgb, var(--card-border) 85%, transparent);
}

body[data-theme="day"] .card,
body[data-theme="day"] .card-head,
body[data-theme="day"] .chart-shell,
body[data-theme="day"] .chart-wrapper,
body[data-theme="day"] .details {
  background: #FFFFFF;
  border: 1px solid #D0D5DD;
  box-shadow: 0 10px 24px rgba(16,24,40,.08);
  backdrop-filter: none;
}

body[data-theme="day"] .card {
  background: #FFFFFF;
}

body[data-theme="day"] .card::before {
  opacity: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(6, 8, 12, 0.92), rgba(4, 6, 10, 0.94));
  border: 1px solid color-mix(in srgb, var(--card-border) 75%, rgba(6, 10, 16, 0.7));
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.06);
  position: relative;
  z-index: 1;
}

.card-head::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.card[data-direction="long"] .card-head {
  border-color: color-mix(in srgb, var(--card-progress-tp) 42%, rgba(16,40,34,.4));
}

.card[data-direction="short"] .card-head {
  border-color: color-mix(in srgb, var(--card-progress-sl) 42%, rgba(36,20,26,.4));
}

.symbol-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.symbol-wrap h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .18px;
  color: #e6f4f6;
}

.tf-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffd54a;
  font-weight: 600;
}

.live-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #ffd54a;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  letter-spacing: 0.02em;
  min-width: 72px;
  justify-content: center;
  box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.08);
}

.live-price[data-trend="up"] {
  color: #00ff9d;
  border-color: rgba(0, 255, 157, 0.4);
  background: rgba(0, 255, 157, 0.08);
}

.live-price[data-trend="down"] {
  color: #ff5f7f;
  border-color: rgba(255, 95, 127, 0.4);
  background: rgba(255, 95, 127, 0.08);
}

.pattern-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(10, 12, 18, 0.78);
  border: 1px solid rgba(255, 215, 0, 0.18);
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: .18px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direction-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: rgba(10, 12, 18, 0.72);
  color: var(--muted);
  font-weight: 600;
}

.bt-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .02em;
  font-weight: 600;
  border: 1px solid rgba(59,199,196,.22);
  background: rgba(10,22,32,.72);
  color: var(--text-color);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bt-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 12, 20, .25);
}

.bt-badge.good {
  border-color: rgba(52, 214, 167, .45);
  color: var(--positive);
  background: rgba(18, 82, 60, .45);
}

.bt-badge.warn {
  border-color: rgba(255, 190, 92, .5);
  color: #ffd48a;
  background: rgba(86, 68, 24, .4);
}

.bt-badge.bad {
  border-color: rgba(255, 110, 130, .45);
  color: var(--negative);
  background: rgba(84, 24, 36, .45);
}

.bt-badge.neutral {
  border-color: rgba(140, 170, 188, .4);
  color: var(--muted);
}

.bt-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(6, 18, 28, .94);
  border: 1px solid rgba(59,199,196,.22);
  color: var(--text-color);
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 18px 30px rgba(5,12,20,.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 4;
}

.bt-wrap:hover .bt-popover,
.bt-wrap[data-open="true"] .bt-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body[data-theme="day"] .bt-badge {
  background: #F2F4F7;
  border-color: #D0D5DD;
  color: #101828;
  box-shadow: 0 6px 14px rgba(16,24,40,.08);
}

body[data-theme="day"] .bt-popover {
  background: #FFFFFF;
  border-color: #D0D5DD;
  color: #101828;
}

.scan-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.85);
  opacity: .9;
  padding: 4px 0 6px;
}

.scan-indicator::before {
  content: '🧭';
  font-size: 12px;
}

.direction-pill.long {
  background: rgba(44,138,112,.22);
  color: var(--positive);
  border-color: rgba(56,162,132,.45);
}

.direction-pill.short {
  background: rgba(190,78,96,.22);
  color: var(--negative);
  border-color: rgba(202,102,120,.45);
}

.direction-pill.pending {
  background: rgba(59,199,196,.2);
  color: var(--accent);
  border-color: rgba(59,199,196,.38);
}

.chart-shell {
  position: relative;
  height: clamp(320px, 38vh, 460px);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 215, 0, 0.08), transparent 52%),
    linear-gradient(170deg, rgba(5, 7, 12, 0.96), rgba(2, 4, 8, 0.96));
  border: 1px solid color-mix(in srgb, var(--card-border) 70%, rgba(8, 12, 18, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  backdrop-filter: blur(12px) saturate(140%);
}

.card[data-direction="long"] .chart-shell {
  border-color: color-mix(in srgb, var(--card-progress-tp) 40%, rgba(12,40,32,.45));
}

.card[data-direction="short"] .chart-shell {
  border-color: color-mix(in srgb, var(--card-progress-sl) 40%, rgba(42,22,28,.45));
}

.chart-wrapper {
  position: relative;
  flex: 1;
  min-height: clamp(220px, 30vh, 380px);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: stretch;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 215, 0, 0.06), transparent 42%),
    linear-gradient(176deg, rgba(6, 8, 12, 0.96), rgba(2, 4, 8, 0.94));
  border: 1px solid color-mix(in srgb, var(--card-border) 65%, rgba(6, 10, 16, 0.7));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 16px 30px rgba(0, 0, 0, 0.45);
}

.card[data-direction="long"] .chart-wrapper {
  border-color: color-mix(in srgb, var(--card-progress-tp) 38%, rgba(16,46,40,.45));
}

.card[data-direction="short"] .chart-wrapper {
  border-color: color-mix(in srgb, var(--card-progress-sl) 38%, rgba(44,24,32,.45));
}

.chart-wrapper > .chart {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.chart-wrapper > canvas.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.35));
}

.chart-radar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--card-radar-sweep, rgba(255, 215, 0, 0.22)) 60%, transparent) 0%, transparent 74%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--card-radar-glow, rgba(255, 215, 0, 0.12)) 45%, transparent) 0%, transparent 92%);
  mix-blend-mode: screen;
  opacity: .3;
  transition: opacity .35s ease, filter .35s ease, box-shadow .35s ease;
  border: 1px solid color-mix(in srgb, var(--card-radar-sweep, rgba(255, 215, 0, 0.18)) 36%, transparent);
}

.chart-radar.animate-pulse {
  animation: radarPulse 2.4s ease-in-out infinite;
}

@keyframes radarPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(59, 199, 196, 0);
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 215, 0, 0.35);
  }
}

.depth-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: 74px;
  pointer-events: none;
  z-index: 2;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 0, 85, 0.12), rgba(6, 8, 12, 0.4) 48%, rgba(6, 8, 12, 0.4) 52%, rgba(0, 255, 157, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
  opacity: 0.8;
}

.depth-overlay::before,
.depth-overlay::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 0, 85, 0.35) 0%,
    rgba(255, 0, 85, 0.35) 16%,
    rgba(255, 0, 85, 0.05) 16%,
    rgba(255, 0, 85, 0.05) 34%
  );
  mix-blend-mode: screen;
}

.depth-overlay::after {
  top: 52%;
  bottom: 10%;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 255, 157, 0.35) 0%,
    rgba(0, 255, 157, 0.35) 16%,
    rgba(0, 255, 157, 0.05) 16%,
    rgba(0, 255, 157, 0.05) 34%
  );
}

.depth-overlay::before {
  top: 10%;
  bottom: 52%;
}

.volume-strip {
  position: absolute;
  left: 14px;
  right: 98px;
  bottom: 12px;
  height: 26px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(0, 243, 255, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.12);
  pointer-events: none;
  z-index: 2;
}

.volume-strip::before {
  content: '';
  position: absolute;
  inset: 6px 8px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 215, 0, 0.45) 0,
    rgba(255, 215, 0, 0.45) 8px,
    rgba(255, 215, 0, 0.12) 8px,
    rgba(255, 215, 0, 0.12) 16px
  );
  opacity: 0.6;
}

.indicator-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 86px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  z-index: 4;
  pointer-events: none;
}

.indicator-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 10, 16, 0.82);
  border: 1px solid rgba(255, 215, 0, 0.18);
  color: rgba(248, 250, 252, 0.9);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.12);
}

.indicator-chip strong {
  font-size: 11px;
  color: #ffd54a;
}

.indicator-chip[data-status="up"] strong {
  color: #00ff9d;
}

.indicator-chip[data-status="down"] strong {
  color: #ff5f7f;
}

@media (prefers-reduced-motion: reduce) {
  .chip,
  .card,
  .chart-radar.animate-pulse {
    transition: none;
    animation: none;
  }
}

.chart-radar[data-stage="signal"] {
  opacity: .3;
  filter: saturate(118%);
}

.chart-radar[data-direction="long"] {
  border-color: color-mix(in srgb, var(--card-progress-tp) 34%, transparent);
}

.chart-radar[data-direction="short"] {
  border-color: color-mix(in srgb, var(--card-progress-sl) 34%, transparent);
}

.chart-radar[data-highlight="true"] {
  opacity: .4;
  filter: saturate(130%);
}

.chart-radar__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .42;
}

.chart-radar[data-stage="signal"] .chart-radar__canvas {
  opacity: .55;
}

.chart-radar[data-highlight="true"] .chart-radar__canvas {
  opacity: .68;
}

.details {
  font-size: 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(6,20,34,.62);
  border: 1px solid color-mix(in srgb, var(--card-border) 42%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  position: relative;
  z-index: 1;
}

.card[data-direction="long"] .details {
  border-color: color-mix(in srgb, var(--card-progress-tp) 32%, transparent);
}

.card[data-direction="short"] .details {
  border-color: color-mix(in srgb, var(--card-progress-sl) 32%, transparent);
}

.details strong {
  font-weight: 600;
  color: rgba(188,242,232,.9);
  font-size: 12px;
}

body[data-theme="day"] .details strong {
  color: #101828;
}

.details span {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-color);
}

.progress {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  --progress-bg: linear-gradient(120deg, rgba(8,22,30,.72), rgba(59,199,196,.12));
  --progress-border: color-mix(in srgb, var(--card-border) 52%, transparent);
  --progress-text: rgba(210,236,240,.85);
  background: var(--progress-bg);
  border: 1px solid var(--progress-border);
  font-size: 12px;
  justify-content: space-between;
}

.progress span {
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--progress-text);
}

.card[data-direction="long"] .progress {
  --progress-bg: linear-gradient(120deg, rgba(10,28,22,.82), color-mix(in srgb, var(--card-progress-tp) 26%, transparent));
  --progress-border: color-mix(in srgb, var(--card-progress-tp) 40%, transparent);
  --progress-text: color-mix(in srgb, var(--card-progress-tp) 70%, rgba(214,240,234,.9));
}

.card[data-direction="short"] .progress {
  --progress-bg: linear-gradient(120deg, rgba(30,14,20,.82), color-mix(in srgb, var(--card-progress-sl) 26%, transparent));
  --progress-border: color-mix(in srgb, var(--card-progress-sl) 40%, transparent);
  --progress-text: color-mix(in srgb, var(--card-progress-sl) 70%, rgba(240,220,224,.9));
}

.progress .progress-value {
  color: var(--text-color);
  font-weight: 700;
}

.progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(6,14,22,.65);
  overflow: hidden;
  margin: 0 8px;
}

.progress-bar > div {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(59,199,196,.35), var(--card-progress-tp));
  background-size: 220% 100%;
  animation: progress-wave 2.2s linear infinite;
  will-change: width, transform;
  transition: width .55s cubic-bezier(.22,.61,.36,1), background .35s ease;
}

.detached-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(72, 122, 210, 0.16), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(88, 210, 192, 0.12), transparent 52%),
    rgba(4,10,16,.78);
  backdrop-filter: blur(18px) saturate(165%);
  z-index: 420;
  padding: 32px 18px;
}

.detached-overlay.active {
  display: flex;
}

body[data-theme="day"] .detached-overlay {
  background: rgba(16,24,40,.45);
  backdrop-filter: blur(12px);
}

.detached-frame {
  width: min(96vw, 1180px);
  max-height: 92vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  position: relative;
  padding: 8px;
}

.detached-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(10,20,30,.75);
  color: rgba(240,247,255,.9);
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  z-index: 3;
}

.detached-close:hover {
  transform: translateY(-1px);
  background: rgba(18,30,44,.9);
  border-color: rgba(255,255,255,.32);
}

.detached-close:active {
  transform: translateY(0);
}

.card.detached {
  width: 100%;
  max-width: 1120px;
  height: min(92vh, 760px);
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 20%, rgba(76, 182, 199, .18), transparent 48%),
    radial-gradient(circle at 82% 0%, rgba(148, 130, 255, .14), transparent 46%),
    linear-gradient(160deg, rgba(6,16,26,.98), rgba(4,12,22,.94));
  border: 1px solid color-mix(in srgb, var(--card-border) 75%, rgba(18,38,52,.65));
  box-shadow: 0 40px 80px rgba(0,0,0,.45);
}

body[data-theme="day"] .detached-frame {
  background: transparent;
}

body[data-theme="day"] .detached-close {
  border-color: rgba(16,24,40,.12);
  background: rgba(255,255,255,.92);
  color: #101828;
  box-shadow: 0 10px 22px rgba(16,24,40,.18);
}

body[data-theme="day"] .card.detached {
  background: #FFFFFF;
  border: 1px solid #D0D5DD;
  box-shadow: 0 30px 60px rgba(16,24,40,.18);
}

body[data-theme="day"] .card.detached .chart-shell {
  background: #FFFFFF;
  border: 1px solid #D0D5DD;
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.04);
}

.card.detached .card-head,
.card.detached .details,
.card.detached .progress {
  position: relative;
  left: auto;
  right: auto;
  width: 100%;
  z-index: 2;
}

.card.detached .card-head {
  padding: 0;
  gap: 18px;
  align-items: center;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.card.detached .card-head .card-tools {
  margin-left: auto;
}

.card.detached .card-head .pattern-pill {
  max-width: none;
}

.card.detached .chart-shell {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(59,199,196,.08), transparent 62%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 18px 40px rgba(0,0,0,.32);
}

.card.detached .details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 18px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(6,16,26,.8);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(18px) saturate(160%);
}

.card.detached .progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(6,16,26,.8);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(18px) saturate(160%);
}

body[data-theme="day"] .card.detached .details,
body[data-theme="day"] .card.detached .progress {
  background: #FFFFFF;
  border: 1px solid #D0D5DD;
  box-shadow: 0 8px 18px rgba(16,24,40,.08);
  backdrop-filter: none;
}

.detached-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(6,14,24,.78);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text-color);
  font-size: 12px;
  text-align: center;
  max-width: min(90vw, 540px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  backdrop-filter: blur(14px) saturate(160%);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 120;
}

body[data-theme="day"] .detached-hint {
  background: rgba(255,255,255,.92);
  border: 1px solid #D0D5DD;
  color: #101828;
  box-shadow: 0 16px 32px rgba(16,24,40,.12);
}

.detached-overlay.active .detached-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(7,15,26,.9);
  color: #f1fffe;
  font-size: 13px;
  box-shadow: 0 16px 32px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  transform: translate(-50%, 20px);
  z-index: 120;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.indicator-pill {
  margin-left: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator-pill[data-state="ok"] {
  color: #4cd9a5;
  border-color: rgba(76, 217, 165, 0.4);
}

.indicator-pill[data-state="off"] {
  color: #ff8a9b;
  border-color: rgba(255, 138, 155, 0.4);
}

.debug-panel {
  position: fixed;
  right: 12px;
  bottom: 64px;
  width: min(420px, 90vw);
  max-height: 45vh;
  background: rgba(12, 20, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 10px;
  overflow: hidden;
  z-index: 20;
}

.debug-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.debug-panel__log {
  max-height: 32vh;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px;
}

.debug-panel__log-entry + .debug-panel__log-entry {
  margin-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

.signal-ticker {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(90, 150, 255, 0.2);
  background: linear-gradient(120deg, rgba(7, 16, 26, 0.96), rgba(10, 22, 36, 0.9));
  box-shadow: 0 14px 30px rgba(4, 12, 22, 0.45), inset 0 0 18px rgba(59, 199, 196, 0.1);
  overflow: hidden;
}

.signal-ticker__inner {
  display: grid;
  gap: 8px;
}

.signal-ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.signal-ticker__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4cd9a5;
  box-shadow: 0 0 12px rgba(76, 217, 165, 0.8);
  animation: pulseDot 2.2s ease-in-out infinite;
}

.signal-ticker__track {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.signal-ticker__items {
  display: inline-flex;
  gap: 12px;
  width: max-content;
  animation: tickerScroll var(--ticker-duration, 18s) linear infinite;
}

.signal-ticker[data-active='0'] .signal-ticker__items {
  animation: none;
}

.signal-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 14, 22, 0.75);
  color: var(--text-color);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(4, 12, 20, 0.4);
}

.signal-ticker__item.priority-high {
  border-color: rgba(76, 217, 165, 0.45);
  box-shadow: 0 10px 22px rgba(76, 217, 165, 0.2);
}

.signal-ticker__item.priority-mid {
  border-color: rgba(120, 171, 255, 0.45);
}

.signal-ticker__item.priority-low {
  border-color: rgba(255, 180, 90, 0.35);
}

.signal-ticker__pair {
  font-weight: 700;
  color: #e6fbff;
}

.signal-ticker__pattern {
  color: #b7d8ff;
}

.signal-ticker__direction {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, 0.7);
}

.signal-ticker__quality {
  font-weight: 700;
}

.signal-ticker__priority,
.signal-ticker__meta {
  color: rgba(255, 255, 255, 0.6);
}

.signal-ticker__empty {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 0;
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: .7;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4,10,16,.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 220;
}

.modal-backdrop.active {
  display: flex;
}

body[data-theme="day"] .modal-backdrop {
  background: rgba(16,24,40,.45);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(1024px, 92vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 22px;
  padding: 18px 22px 24px;
  background: var(--panel-color);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal.referral-modal {
  position: relative;
  overflow: hidden;
  max-height: 90vh;
}

.modal.referral-modal::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(92, 196, 255, 0.25), transparent 60%);
  opacity: .4;
  filter: blur(40px);
  animation: referralGlow 4.5s ease-in-out infinite;
  pointer-events: none;
}

.modal.referral-modal::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(80, 164, 255, 0.2);
  box-shadow: 0 0 24px rgba(92, 196, 255, 0.2);
  pointer-events: none;
}

.modal.referral-modal > * {
  position: relative;
  z-index: 1;
}

.modal.referral-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(84, 214, 178, 0.5) transparent;
}

.modal.referral-modal .modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal.referral-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(84, 214, 178, 0.4);
  border-radius: 999px;
}

.modal.analysis-modal {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(6, 8, 12, 0.98), rgba(3, 5, 8, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 80px rgba(255, 215, 0, 0.12), 0 30px 80px rgba(0, 0, 0, 0.7);
}

.modal.analysis-modal::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.18), transparent 62%);
  filter: blur(35px);
  opacity: 0.5;
  pointer-events: none;
}

.modal.analysis-modal::after {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: inset 0 0 24px rgba(255, 215, 0, 0.12);
  pointer-events: none;
}

.modal.analysis-modal > * {
  position: relative;
  z-index: 1;
}

.analysis-modal__title {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #f8fafc;
}

.analysis-modal__subtitle {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: rgba(255, 215, 0, 0.85);
  text-transform: uppercase;
}

.analysis-modal__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analysis-modal__card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(8, 10, 16, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.16);
  box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.08);
}

.analysis-modal__card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 215, 0, 0.8);
}

.analysis-modal__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: rgba(248, 250, 252, 0.82);
  font-size: 13px;
}

.analysis-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: rgba(248, 250, 252, 0.7);
}

.analysis-modal__meta strong {
  color: #ffd54a;
}

@keyframes referralGlow {
  0%, 100% {
    opacity: .35;
    transform: scale(1);
  }
  50% {
    opacity: .6;
    transform: scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .signal-ticker__items,
  .signal-ticker__dot,
  .modal.referral-modal::before {
    animation: none;
  }
}

body[data-theme="day"] .modal {
  background: #FFFFFF;
  color: #101828;
  border: 1px solid #D0D5DD;
  box-shadow: 0 20px 60px rgba(16,24,40,.25);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal h3 {
  margin: 0;
  font-size: 20px;
}

.modal .primary,
.modal .secondary {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 75%, rgba(86, 120, 210, .3));
  background: linear-gradient(135deg, rgba(8, 18, 30, .9), rgba(10, 24, 36, .85));
  color: #e6f4ff;
  font-weight: 700;
  letter-spacing: .15px;
  box-shadow: 0 10px 24px rgba(4, 10, 18, .55);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease, background .25s ease;
}

.modal .primary {
  background: linear-gradient(135deg, rgba(59, 199, 196, .32), rgba(74, 160, 255, .26));
  border-color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, .18));
  color: #e6fbff;
}

.modal .secondary {
  background: linear-gradient(135deg, rgba(10, 22, 34, .92), rgba(7, 16, 26, .88));
}

.modal .primary:hover,
.modal .secondary:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, .2));
  box-shadow: 0 14px 30px rgba(4, 12, 22, .55), 0 0 16px rgba(59, 199, 196, .26);
}

.modal .primary:active,
.modal .secondary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(3, 8, 16, .55), 0 0 12px rgba(59, 199, 196, .22);
}

.modal .primary:disabled,
.modal .secondary:disabled {
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}

.upsell-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.stats-period {
  font-size: 13px;
  color: var(--muted);
}

.section-title {
  margin: 12px 0 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 12px;
}

.stats-grid .stat {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(0,0,0,.16);
  display: grid;
  gap: 4px;
}

.stats-grid span {
  font-size: 12px;
  color: var(--muted);
}

.stats-grid strong {
  font-size: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table th,
table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.card-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}

.card-tools button {
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: rgba(255, 215, 0, 0.12);
  color: var(--text-color);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.card-tools button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.card-tools button.active {
  background: var(--accent);
  color: #1a1200;
  border-color: var(--accent);
  box-shadow: 0 20px 36px rgba(255, 215, 0, 0.3);
}

.analysis-btn {
  border: 1px solid rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.15);
  color: #ffd54a;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(255, 215, 0, 0.15);
}

.analysis-btn:hover {
  background: rgba(255, 215, 0, 0.32);
  color: #1c1400;
}

.tf-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tf-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.tf-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(84, 214, 178, 0.35);
  background: linear-gradient(160deg, rgba(7, 20, 30, 0.9), rgba(6, 16, 26, 0.75));
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 8px 20px rgba(5, 12, 20, 0.35);
  backdrop-filter: blur(10px) saturate(150%);
  transition: transform .2s ease, border .2s ease, box-shadow .25s ease, background .25s ease;
}

.toolbar .tf-trigger {
  min-width: 78px;
  padding: 6px 10px;
  font-size: 12px;
  gap: 6px;
}

.tf-trigger__label {
  pointer-events: none;
}

.tf-trigger__icon {
  font-size: 12px;
  opacity: .7;
  transition: transform .2s ease;
}

.tf-select.open .tf-trigger__icon {
  transform: rotate(180deg);
}

.tf-trigger:hover {
  border-color: rgba(84, 214, 178, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(5, 12, 22, 0.45);
}

.tf-trigger:focus-visible {
  outline: 2px solid rgba(84, 214, 178, 0.7);
  outline-offset: 2px;
}

.tf-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(84, 214, 178, 0.25);
  background: linear-gradient(170deg, rgba(7, 18, 28, 0.98), rgba(4, 10, 18, 0.92));
  box-shadow: 0 18px 40px rgba(5, 12, 22, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 240;
}

.tf-select.open .tf-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tf-item {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  background: transparent;
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.tf-item:hover,
.tf-item:focus-visible {
  background: rgba(59, 199, 196, 0.14);
  color: #e6fbfb;
  outline: none;
  transform: translateX(2px);
}

.tf-item.active {
  background: rgba(59, 199, 196, 0.25);
  color: #ffffff;
}

@media (max-width: 840px) {
  .toolbar .tf-select,
  .toolbar .tf-trigger {
    width: 100%;
  }

  .tf-menu {
    min-width: 100%;
  }
}

.account-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  margin: 2px 0 0;
  width: 100%;
}

.account-metrics,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.account-actions {
  justify-content: flex-end;
  flex: 1 1 320px;
}

.account-metrics {
  justify-content: flex-start;
  flex: 2 1 320px;
}

.account-actions button,
.account-actions a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 70%, rgba(59, 199, 196, .32));
  background: linear-gradient(135deg, rgba(8, 18, 30, .92), rgba(10, 28, 42, .88));
  color: var(--text-color);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .12px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(3, 8, 16, .32), 0 0 0 1px rgba(255, 255, 255, .03);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease, background .25s ease, color .2s ease;
  overflow: hidden;
}

.account-actions button.primary {
  background: linear-gradient(135deg, rgba(59, 199, 196, .32), rgba(74, 160, 255, .26));
  border-color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, .18));
  color: #e6fbff;
  box-shadow: 0 10px 26px rgba(4, 12, 20, .52), 0 0 14px rgba(59, 199, 196, .28);
}

.account-actions button.secondary,
.account-actions a.secondary {
  background: linear-gradient(135deg, rgba(10, 20, 34, .92), rgba(8, 18, 30, .88));
  border-color: color-mix(in srgb, var(--panel-border) 80%, rgba(86, 120, 210, .24));
  color: #e8f4ff;
}

.account-actions button::after,
.account-actions a::after {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle at 50% 50%, rgba(59, 199, 196, .24), transparent 45%);
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity .3s ease;
}

.account-actions button:hover,
.account-actions a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 65%, rgba(255, 255, 255, .16));
  box-shadow: 0 10px 22px rgba(4, 12, 22, .5), 0 0 16px rgba(59, 199, 196, .26);
  background: linear-gradient(135deg, rgba(10, 24, 36, .98), rgba(14, 36, 52, .9));
}

.account-actions button:hover::after,
.account-actions a:hover::after {
  opacity: .65;
}

.account-actions button:active,
.account-actions a:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(3, 8, 16, .5), 0 0 10px rgba(59, 199, 196, .24);
}

.account-actions a {
  line-height: 1;
}

@keyframes neonPulse {
  0%, 100% {
    opacity: .28;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: .52;
    transform: translate3d(0, -1px, 0) scale(1.02);
  }
}

.indicator-balance {
  background: color-mix(in srgb, var(--accent) 35%, rgba(255,255,255,.08));
  color: #fff;
}

.indicator-ref {
  background: color-mix(in srgb, #6c7bff 35%, rgba(255,255,255,.08));
  color: #f6f9ff;
}

.indicator-pro {
  background: color-mix(in srgb, #f5d34d 35%, rgba(255,255,255,.08));
  color: #1b1507;
  font-weight: 700;
}

.indicator-pro[data-active='1'] {
  box-shadow: 0 0 16px rgba(245, 211, 77, .5), 0 0 30px rgba(245, 211, 77, .25);
  animation: proGlow 2.4s ease-in-out infinite;
}

.indicator-pro-timer {
  background: color-mix(in srgb, rgba(59, 199, 196, .55) 30%, rgba(255,255,255,.08));
  color: #e9fffe;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .4s ease, box-shadow .4s ease;
}

.indicator-pro-timer[data-tick='1'] {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(59, 199, 196, .35);
}

@keyframes proGlow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(245, 211, 77, .35), 0 0 24px rgba(245, 211, 77, .18);
  }
  50% {
    box-shadow: 0 0 20px rgba(245, 211, 77, .55), 0 0 36px rgba(245, 211, 77, .35);
  }
}

.icon-only {
  width: 32px;
  justify-content: center;
  padding: 6px;
}

.account-bar .indicator-pill {
  margin-left: 0;
  padding: 5px 9px;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .account-bar {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .account-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-actions button,
  .account-actions a {
    transition: none;
  }
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  background: rgba(5,10,16,.8);
  z-index: 150;
}

.auth-gate.active {
  display: flex;
}

.auth-gate__panel {
  background: var(--panel-color);
  border: 1px solid var(--panel-border);
  padding: 28px 32px;
  border-radius: 18px;
  text-align: center;
  color: var(--text-color);
  box-shadow: var(--shadow);
}

.auth-gate.is-checking .auth-gate__panel::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid rgba(70, 255, 226, .18);
  border-top-color: #46ffe2;
  border-radius: 50%;
  animation: auth-gate-spin .8s linear infinite;
}

@keyframes auth-gate-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gate.is-checking .auth-gate__panel::before { animation: none; }
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.settings-grid form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}

.settings-grid input,
.settings-grid select,
#withdraw-modal input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(5,12,20,.35);
  color: var(--text-color);
}

.wallet-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.wallet-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 199, 196, 0.4);
  background: rgba(6, 16, 26, 0.8);
  color: #e7fbff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

.wallet-input input {
  width: 100%;
}

.settings-grid button,
#withdraw-submit {
  align-self: flex-start;
}

#referral-lists {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
}

#referral-lists table {
  width: 100%;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.muted.small {
  font-size: 12px;
}

.referral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.stat-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,.02);
  display: grid;
  gap: 6px;
}

.referral-modal .stat-card {
  background: linear-gradient(160deg, rgba(9, 20, 30, 0.9), rgba(6, 16, 26, 0.75));
  border-color: rgba(84, 214, 178, 0.28);
  box-shadow: 0 10px 24px rgba(4, 12, 20, 0.35);
}

.referral-modal .stat-card strong {
  color: #e8fdff;
  text-shadow: 0 0 14px rgba(84, 214, 178, 0.35);
}

.stat-card strong {
  font-size: 22px;
}

.referral-links {
  display: grid;
  gap: 6px;
  margin: 6px 0 12px;
}

.referral-modal table {
  background: rgba(6, 16, 26, 0.7);
  border-radius: 14px;
  border: 1px solid rgba(84, 214, 178, 0.18);
  overflow: hidden;
}

.referral-modal table thead th {
  background: rgba(9, 24, 36, 0.9);
  color: rgba(231, 251, 255, 0.85);
  font-weight: 600;
}

.referral-modal .table-head {
  padding: 6px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.referral-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(89, 180, 255, 0.25);
  background: linear-gradient(120deg, rgba(10, 20, 34, 0.9), rgba(12, 32, 50, 0.92));
  box-shadow: 0 10px 24px rgba(5, 14, 24, 0.4);
}

.referral-hero__badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #e7f9ff;
  background: rgba(59, 199, 196, 0.2);
  border: 1px solid rgba(59, 199, 196, 0.45);
  white-space: nowrap;
}

.ref-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.ref-link {
  word-break: break-all;
  color: var(--text-color);
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 6px;
}

.upsell-price {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,.02);
  margin: 8px 0;
}

.pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: flex-start;
}

.radio-group {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feature-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.feature-list li::before {
  content: '•';
  color: var(--accent);
  margin-right: 6px;
}

.focus-mode {
  display: flex;
  gap: 8px;
  padding: 8px 16px 2px;
}
.focus-mode .secondary,
.signal-ticker__actions .secondary {
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 78%, rgba(86, 120, 210, .24));
  background: linear-gradient(135deg, rgba(10, 20, 34, .92), rgba(8, 18, 30, .88));
  color: #e8f4ff;
  box-shadow: 0 6px 16px rgba(3, 8, 16, .32), 0 0 0 1px rgba(255, 255, 255, .03);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease, background .25s ease;
}
.focus-mode .secondary:hover,
.signal-ticker__actions .secondary:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 62%, rgba(255, 255, 255, .16));
  box-shadow: 0 10px 22px rgba(4, 12, 22, .5), 0 0 16px rgba(59, 199, 196, .26);
  background: linear-gradient(135deg, rgba(10, 24, 36, .98), rgba(14, 36, 52, .9));
}
.focus-mode .secondary[data-active="1"],
#ticker-auto-focus[data-active="1"] {
  border-color: rgba(59, 199, 196, 0.58);
  box-shadow: 0 0 0 1px rgba(59, 199, 196, 0.3) inset, 0 0 15px rgba(59, 199, 196, 0.24);
  background: linear-gradient(135deg, rgba(26, 78, 92, .52), rgba(18, 44, 68, .84));
}
.signal-ticker {
  position: sticky;
  top: 0;
  z-index: 25;
  backdrop-filter: blur(8px);
}
.signal-ticker__inner { display:flex; align-items:center; gap:10px; }
.signal-ticker__track { overflow-x:auto; white-space:nowrap; flex:1; }
.signal-pill { margin-right:8px; border-radius:999px; padding:6px 10px; background:rgba(255,213,74,0.14); border:1px solid rgba(255,213,74,0.28); color:#f7f0ce; }
.signal-ticker__actions { display:flex; gap:6px; }
.signal-inbox {
  position: fixed;
  right: 0;
  top: var(--signal-inbox-top, 0px);
  height: calc(100dvh - var(--signal-inbox-top, 0px));
  width: min(500px, 100vw);
  transform: translateX(102%);
  transition: transform .22s ease;
  z-index: 65;
  background: linear-gradient(160deg, rgba(10, 19, 31, 0.97), rgba(10, 22, 36, 0.96));
  border-left: 1px solid rgba(255,213,74,0.25);
  backdrop-filter: blur(14px);
  display:flex;
  flex-direction:column;
}
.signal-inbox.open { transform: translateX(0); }
.signal-inbox__head, .signal-inbox__filters { padding: 12px; display:flex; gap:8px; align-items:center; }
.signal-inbox__filters input, .signal-inbox__filters select { flex:1; background: rgba(9, 16, 28, 0.7); color:#f6f0d5; border:1px solid rgba(255,213,74,.24); border-radius:10px; padding:8px; }
.signal-inbox__list { overflow:auto; padding: 0 12px 12px; }
.signal-inbox__row { border:1px solid rgba(255,213,74,.15); border-radius:14px; padding:11px; margin:8px 0; background: rgba(9, 16, 27, 0.72); }
.signal-inbox__meta { display:flex; gap:6px; flex-wrap:wrap; font-size:12px; }
.signal-inbox__sub { display:flex; gap:8px; font-size:11px; opacity:.84; margin-top:6px; }
.signal-inbox__prices { margin-top: 8px; display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:6px 10px; font-size:12px; }
.signal-inbox__prices span { display:flex; justify-content:space-between; gap:8px; border-bottom:1px dashed rgba(255,255,255,.08); padding-bottom:2px; }
.signal-inbox__prices em { font-style:normal; color: rgba(188, 204, 224, .86); }
.signal-inbox__prices strong { font-weight:700; color:#e9f0ff; }
.signal-inbox__prices .profit { color: #6cfac1; }
.signal-inbox__prices .roi-up { color: #47f5de; }
.signal-inbox__prices .roi-down { color: #ff8da0; }
.signal-inbox__progress { position:relative; margin-top:9px; border-radius:999px; border:1px solid rgba(255,255,255,.1); overflow:hidden; background: rgba(12, 26, 42, 0.62); min-height:22px; }
.signal-inbox__progress-fill { height:100%; width:0%; transition: width .5s cubic-bezier(.2,.8,.2,1), filter .35s ease, background .35s ease; }
.signal-inbox__progress.to-tp .signal-inbox__progress-fill { background: linear-gradient(90deg, rgba(74, 236, 255, .45), rgba(34, 201, 255, .9)); filter: drop-shadow(0 0 7px rgba(34, 201, 255, .5)); }
.signal-inbox__progress.to-sl .signal-inbox__progress-fill { background: linear-gradient(90deg, rgba(255, 132, 156, .42), rgba(255, 94, 118, .9)); filter: drop-shadow(0 0 7px rgba(255, 94, 118, .45)); }
.signal-inbox__progress-meta { position:absolute; inset:0; display:flex; justify-content:space-between; align-items:center; padding:0 8px; font-size:11px; color:#e8f6ff; text-shadow: 0 1px 5px rgba(0,0,0,.45); }
.signal-inbox__actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.signal-inbox__actions button { border:1px solid rgba(255,213,74,.25); background:rgba(255,213,74,.08); color:#f4e8bd; border-radius:8px; padding:4px 8px; }
.badge.new { color:#8cffbd; }
.badge.seen { color:#b3c7ff; }
.badge.done { color:#d8d8d8; }
.badge.archive { color:#9b9b9b; }
.card-jump-highlight {
  animation: cardPulse 2.5s ease;
  outline: 2px solid rgba(255, 213, 74, 0.7);
  box-shadow: 0 0 0 2px rgba(255,213,74,0.25), 0 0 28px rgba(255,213,74,0.26);
}
@keyframes cardPulse {
  0% { transform: translateX(0) scale(1); }
  15% { transform: translateX(1px) scale(1.004); }
  40% { transform: translateX(-1px) scale(1.003); }
  100% { transform: translateX(0) scale(1); }
}
.card-hidden-by-focus { display: none !important; }
@media (max-width: 760px){
  .signal-inbox { width:100vw; border-left:0; }
  .signal-ticker__actions { display:none; }
  .signal-inbox__prices { grid-template-columns: 1fr; }
}


@keyframes progress-wave {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}
