:root {
  --bg-0: #020615;
  --bg-1: #03103a;
  --bg-2: #071f66;
  --glass: rgba(8, 22, 66, 0.66);
  --glass-2: rgba(7, 17, 48, 0.84);
  --line: rgba(118, 192, 255, 0.3);
  --line-strong: rgba(160, 225, 255, 0.56);
  --text: #f6fbff;
  --muted: #9eb8db;
  --blue: #96d8ff;
  --blue-2: #66beff;
  --mint: #8ce7ff;
  --warn: #ff8fb6;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.52);
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  color: var(--text);
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 50% 16%, rgba(81, 122, 255, 0.56), rgba(81, 122, 255, 0) 52%),
    radial-gradient(circle at 50% 100%, rgba(64, 130, 255, 0.38), rgba(64, 130, 255, 0) 54%),
    radial-gradient(circle at 0% 60%, rgba(46, 106, 255, 0.26), rgba(46, 106, 255, 0) 48%),
    radial-gradient(circle at 100% 60%, rgba(54, 116, 255, 0.24), rgba(54, 116, 255, 0) 48%),
    linear-gradient(178deg, #01040f 0%, #040f35 46%, #051a57 100%);
}

html {
  scroll-behavior: smooth;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

@keyframes grid-breathe {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.82;
  }
}

@keyframes aurora {
  from {
    opacity: 0.68;
    transform: scale(1) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: scale(1.08) rotate(1.4deg);
  }
}

@keyframes liquid-shift {
  0% {
    transform: translateX(-24%) rotate(0deg);
    opacity: 0.35;
  }
  50% {
    transform: translateX(8%) rotate(0.8deg);
    opacity: 0.7;
  }
  100% {
    transform: translateX(30%) rotate(1.5deg);
    opacity: 0.35;
  }
}

@keyframes metric-sheen {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
  }
  8% {
    opacity: 0.2;
  }
  34% {
    opacity: 0;
  }
  100% {
    transform: translateX(160%) skewX(-18deg);
    opacity: 0;
  }
}

@keyframes brand-shimmer {
  0% {
    background-position: 0% 50%;
    opacity: 0.74;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.98;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.74;
  }
}

@keyframes brand-glow {
  0%,
  100% {
    text-shadow: 0 0 14px rgba(196, 228, 255, 0.45), 0 0 30px rgba(94, 152, 255, 0.38);
  }
  50% {
    text-shadow: 0 0 18px rgba(216, 236, 255, 0.62), 0 0 42px rgba(112, 180, 255, 0.56);
  }
}

@keyframes range-glass-sweep {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  20% {
    opacity: 0.2;
  }
  55% {
    opacity: 0;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(106, 166, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 214, 255, 0.1) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 94%);
  animation: grid-breathe 10s ease-in-out infinite;
}

.bg-aurora {
  position: absolute;
  inset: -15% -10% auto -10%;
  height: 75%;
  background: radial-gradient(
      40% 56% at 22% 30%,
      rgba(76, 136, 255, 0.42),
      rgba(76, 136, 255, 0) 72%
    ),
    radial-gradient(
      44% 58% at 76% 18%,
      rgba(104, 184, 255, 0.34),
      rgba(104, 184, 255, 0) 70%
    ),
    radial-gradient(
      34% 50% at 54% 58%,
      rgba(65, 130, 255, 0.3),
      rgba(65, 130, 255, 0) 74%
    );
  filter: blur(24px);
  animation: aurora 16s ease-in-out infinite alternate;
}

.bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.04) 40%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.44) 100%);
}

.app-shell {
  position: relative;
  z-index: 2;
  max-width: 1420px;
  margin: 0 auto;
  padding: 14px 20px 44px;
  display: grid;
  gap: 14px;
}

.liquid-topbar {
  position: sticky;
  top: 10px;
  z-index: 24;
}

.liquid-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(131, 206, 255, 0.4);
  background: linear-gradient(130deg, rgba(9, 20, 58, 0.86), rgba(13, 35, 90, 0.62));
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 9px 10px 10px;
  display: grid;
  gap: 8px;
}

.liquid-shell::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(
      40% 58% at 24% 48%,
      rgba(110, 198, 255, 0.3),
      rgba(110, 198, 255, 0) 70%
    ),
    radial-gradient(46% 64% at 72% 30%, rgba(94, 156, 255, 0.26), rgba(94, 156, 255, 0) 70%);
  pointer-events: none;
  animation: liquid-shift 16s ease-in-out infinite alternate;
}

.liquid-main-row,
.liquid-brand,
.liquid-menu,
.liquid-tools,
.top-control-strip,
.control-strip-main,
.control-group,
.control-strip-meta {
  position: relative;
  z-index: 1;
}

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

.liquid-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 184px;
  padding: 0 6px;
}

.brand-logo {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
}

.brand-logo-svg,
.brand-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 9px rgba(210, 232, 255, 0.4))
    drop-shadow(0 0 20px rgba(113, 172, 255, 0.44));
}

.brand-logo-img {
  object-fit: contain;
}

.brand-name {
  position: relative;
  display: inline-block;
  font-size: clamp(1.02rem, 1.18vw, 1.28rem);
  letter-spacing: 0.074em;
  text-transform: uppercase;
  color: #eef6ff;
  font-weight: 760;
  line-height: 1;
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  text-shadow: 0 0 8px rgba(220, 238, 255, 0.24), 0 0 16px rgba(95, 154, 255, 0.3);
  opacity: 0.98;
}

.brand-name::before {
  display: none;
}

.liquid-menu {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  justify-content: center;
  min-width: 0;
  flex-wrap: wrap;
}

.liquid-menu::-webkit-scrollbar {
  height: 0;
}

.menu-item {
  border-radius: 999px;
  border: 1px solid rgba(132, 205, 255, 0.28);
  color: #d6ebff;
  text-decoration: none;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 10px;
  background: linear-gradient(135deg, rgba(39, 79, 146, 0.28), rgba(39, 79, 146, 0.08));
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease,
    box-shadow 120ms ease, transform 120ms ease;
}

.menu-item:hover {
  color: #f7fcff;
  border-color: rgba(142, 220, 255, 0.6);
  background: linear-gradient(135deg, rgba(101, 180, 255, 0.26), rgba(70, 138, 255, 0.2));
  box-shadow: 0 0 18px rgba(126, 200, 255, 0.28);
  transform: translateY(-1px);
}

.menu-item.is-active {
  color: #f8fcff;
  border-color: rgba(160, 232, 255, 0.68);
  background: linear-gradient(135deg, rgba(112, 204, 255, 0.34), rgba(81, 153, 255, 0.3));
  box-shadow: 0 0 22px rgba(125, 208, 255, 0.3);
}

.liquid-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 144px;
}

.top-control-strip {
  position: relative;
  overflow: visible;
  border-radius: 14px;
  border: 1px solid rgba(126, 198, 255, 0.34);
  background: linear-gradient(130deg, rgba(8, 19, 55, 0.86), rgba(13, 29, 76, 0.74));
  backdrop-filter: blur(14px) saturate(1.14);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 8px 10px 9px;
  display: grid;
  gap: 7px;
}

.top-control-strip::before {
  content: "";
  position: absolute;
  inset: -55% -25%;
  pointer-events: none;
  background: radial-gradient(
      42% 56% at 20% 40%,
      rgba(118, 200, 255, 0.28),
      rgba(118, 200, 255, 0) 72%
    ),
    radial-gradient(46% 62% at 76% 34%, rgba(112, 160, 255, 0.2), rgba(112, 160, 255, 0) 72%);
}

.control-strip-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  min-width: 0;
  border: 1px solid rgba(142, 212, 255, 0.3);
  border-radius: 12px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(7, 19, 52, 0.74), rgba(12, 29, 72, 0.66));
  overflow: visible;
}

.control-primary {
  flex: 1 1 520px;
  flex-wrap: wrap;
  position: relative;
  overflow: visible;
}

.wallet-connect-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.control-actions {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.control-status {
  flex: 1 1 360px;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.advanced-controls {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.advanced-controls[hidden] {
  display: none;
}

.advanced-controls .control-group {
  width: 100%;
}

.control-status .refresh-btn.liquid-btn {
  max-width: 230px;
  font-size: 0.61rem;
  letter-spacing: 0.07em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-status .subscription-pill {
  text-transform: none;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.source-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(152, 216, 255, 0.44);
  background: linear-gradient(135deg, rgba(9, 22, 61, 0.82), rgba(14, 30, 77, 0.7));
  flex: 0 0 auto;
}

.source-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #cde7ff;
  font-family: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 8px;
  cursor: pointer;
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.source-btn:hover {
  color: #f4fbff;
  border-color: rgba(157, 224, 255, 0.58);
}

.source-btn.is-active {
  color: #f7fcff;
  border-color: rgba(161, 232, 255, 0.82);
  background: linear-gradient(135deg, rgba(103, 190, 255, 0.34), rgba(75, 146, 255, 0.32));
  box-shadow: 0 0 18px rgba(123, 212, 255, 0.3);
}

.source-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.refresh-btn.liquid-btn {
  height: 33px;
  padding: 0 10px;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.address-input.liquid-input {
  min-width: 220px;
  width: min(100%, 360px);
  height: 33px;
  border-color: rgba(145, 215, 255, 0.44);
  background: linear-gradient(135deg, rgba(8, 22, 58, 0.8), rgba(12, 34, 80, 0.72));
  flex: 1 1 280px;
}

.address-input.liquid-input:focus {
  border-color: rgba(164, 231, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(103, 193, 255, 0.26);
}

#advanced-controls-toggle[aria-expanded="true"] {
  border-color: rgba(158, 226, 255, 0.8);
  background: linear-gradient(135deg, rgba(103, 190, 255, 0.34), rgba(75, 146, 255, 0.3));
  box-shadow: 0 0 18px rgba(123, 212, 255, 0.3);
}

.wallet-provider-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  max-width: min(340px, calc(100vw - 44px));
  max-height: min(320px, 60vh);
  border: 1px solid rgba(140, 210, 255, 0.52);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(9, 22, 60, 0.96), rgba(11, 28, 78, 0.92));
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(15, 40, 98, 0.75);
  display: grid;
  gap: 4px;
  padding: 6px;
  overflow-y: auto;
  z-index: 80;
  pointer-events: auto;
}

.wallet-provider-menu[hidden] {
  display: none;
}

.wallet-provider-option {
  width: 100%;
  border: 1px solid rgba(137, 204, 255, 0.3);
  border-radius: 9px;
  background: linear-gradient(130deg, rgba(67, 130, 238, 0.23), rgba(54, 104, 196, 0.12));
  color: #e9f6ff;
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.wallet-provider-option:hover {
  border-color: rgba(161, 229, 255, 0.72);
  background: linear-gradient(130deg, rgba(93, 181, 255, 0.3), rgba(73, 140, 255, 0.2));
  transform: translateY(-1px);
}

.wallet-provider-hint {
  color: #a7c4e5;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 4px 1px;
}

.subscription-pill.liquid-pill {
  border-color: rgba(122, 204, 255, 0.5);
  background: linear-gradient(135deg, rgba(14, 31, 74, 0.82), rgba(11, 38, 91, 0.7));
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: min(100%, 380px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-strip-meta {
  margin: 0;
  color: #a6c2e2;
  font-size: 0.71rem;
  letter-spacing: 0.04em;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  padding: 0 2px;
}

.refresh-btn.top-refresh-btn {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  padding: 9px 12px;
  border-color: rgba(154, 225, 255, 0.6);
  background: linear-gradient(135deg, rgba(96, 177, 255, 0.38), rgba(68, 139, 255, 0.3));
  box-shadow: 0 0 0 1px rgba(15, 35, 82, 0.9), 0 0 24px rgba(122, 206, 255, 0.28);
}

.address-input {
  min-width: 260px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148, 213, 255, 0.46);
  padding: 0 14px;
  background: rgba(8, 24, 64, 0.74);
  color: var(--text);
  outline: none;
}

.address-input::placeholder {
  color: #9fbfdf;
}

.address-input:focus {
  border-color: rgba(164, 231, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(92, 178, 255, 0.26);
}

.refresh-btn {
  border: 1px solid rgba(149, 219, 255, 0.64);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(89, 166, 255, 0.36), rgba(61, 128, 255, 0.24));
  box-shadow: 0 0 0 1px rgba(11, 39, 90, 0.92), 0 0 24px rgba(113, 203, 255, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(11, 39, 90, 0.92), 0 0 34px rgba(117, 210, 255, 0.34);
}

.refresh-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: saturate(0.55);
  transform: none;
  box-shadow: 0 0 0 1px rgba(12, 39, 90, 0.7);
}

.secondary-btn {
  background: linear-gradient(135deg, rgba(45, 97, 176, 0.36), rgba(63, 119, 196, 0.26));
}

.subscription-pill {
  border-radius: 999px;
  border: 1px solid rgba(143, 214, 255, 0.48);
  padding: 8px 12px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dff4ff;
  background: rgba(9, 35, 86, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subscription-pill.free {
  border-color: rgba(133, 255, 214, 0.58);
  color: #e7fff6;
  background: rgba(17, 98, 95, 0.5);
}

.subscription-pill.paid {
  border-color: rgba(255, 153, 191, 0.56);
  color: #ffe3ef;
  background: rgba(111, 33, 78, 0.52);
}

.subscription-action.disabled {
  opacity: 0.56;
  pointer-events: none;
}

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

#metric-cards,
#section-heatmap,
#section-signals,
#section-pnl,
#section-markets {
  scroll-margin-top: 112px;
}

.metric-card,
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.metric-card::before,
.panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170, 231, 255, 0.86), transparent);
}

.metric-card {
  --metric-line: rgba(118, 205, 255, 0.44);
  --metric-glow: rgba(132, 214, 255, 0.22);
  --metric-a: rgba(72, 159, 255, 0.24);
  --metric-b: rgba(114, 194, 255, 0.2);
  --metric-value: #f6fbff;
  padding: 13px 13px 12px;
  border-color: var(--metric-line);
  background: radial-gradient(
      130% 150% at -10% -30%,
      var(--metric-a),
      rgba(0, 0, 0, 0) 62%
    ),
    radial-gradient(120% 150% at 110% 130%, var(--metric-b), rgba(0, 0, 0, 0) 66%),
    linear-gradient(165deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow), 0 0 28px var(--metric-glow);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: -30% -60%;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.12) 49%,
    rgba(255, 255, 255, 0) 62%
  );
  animation: metric-sheen 9.2s linear infinite;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow), 0 0 34px var(--metric-glow);
}

.metric-card.tone-profit {
  --metric-line: rgba(116, 244, 192, 0.56);
  --metric-glow: rgba(108, 255, 198, 0.24);
  --metric-a: rgba(64, 236, 164, 0.3);
  --metric-b: rgba(104, 255, 208, 0.2);
  --metric-value: #e8fff8;
}

.metric-card.tone-risk {
  --metric-line: rgba(255, 122, 166, 0.58);
  --metric-glow: rgba(255, 114, 160, 0.22);
  --metric-a: rgba(255, 94, 149, 0.32);
  --metric-b: rgba(255, 145, 189, 0.16);
  --metric-value: #ffe9f1;
}

.metric-card.tone-performance {
  --metric-line: rgba(116, 224, 255, 0.58);
  --metric-glow: rgba(117, 216, 255, 0.22);
  --metric-a: rgba(86, 193, 255, 0.28);
  --metric-b: rgba(143, 130, 255, 0.2);
  --metric-value: #edfaff;
}

.metric-card.tone-volume {
  --metric-line: rgba(143, 206, 255, 0.48);
  --metric-glow: rgba(132, 203, 255, 0.2);
  --metric-a: rgba(87, 164, 255, 0.26);
  --metric-b: rgba(121, 201, 255, 0.18);
  --metric-value: #eef8ff;
}

.metric-card.tone-calm {
  --metric-line: rgba(148, 216, 255, 0.5);
  --metric-glow: rgba(140, 214, 255, 0.22);
  --metric-a: rgba(103, 184, 255, 0.24);
  --metric-b: rgba(140, 210, 255, 0.16);
  --metric-value: #f2fbff;
}

.metric-card.tone-warning {
  --metric-line: rgba(255, 192, 120, 0.54);
  --metric-glow: rgba(255, 183, 101, 0.2);
  --metric-a: rgba(255, 171, 73, 0.28);
  --metric-b: rgba(255, 138, 92, 0.16);
  --metric-value: #fff4e5;
}

.metric-label {
  margin: 0;
  color: #a9c8e8;
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.metric-value {
  margin: 8px 0 4px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--metric-value);
  text-shadow: 0 0 18px var(--metric-glow);
}

.metric-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.34;
}

.panel {
  padding: 14px;
}

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

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.34;
}

.heatmap-range-controls {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(151, 225, 255, 0.56);
  background: linear-gradient(130deg, rgba(5, 20, 62, 0.84), rgba(13, 38, 93, 0.74));
  backdrop-filter: blur(16px) saturate(1.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.heatmap-range-controls::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(
      45% 65% at 20% 35%,
      rgba(115, 201, 255, 0.28),
      rgba(115, 201, 255, 0) 72%
    ),
    radial-gradient(
      40% 60% at 78% 30%,
      rgba(118, 146, 255, 0.24),
      rgba(118, 146, 255, 0) 74%
    );
  pointer-events: none;
}

.heatmap-range-controls > button,
.heatmap-range-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(152, 215, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(82, 145, 255, 0.2), rgba(96, 179, 255, 0.1));
  color: #d7edff;
  font-family: inherit;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px rgba(2, 8, 30, 0.32);
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease,
    transform 130ms ease;
}

.heatmap-range-controls > button::before,
.heatmap-range-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(255, 255, 255, 0) 66%
  );
  opacity: 0.62;
  z-index: -1;
}

.heatmap-range-controls > button::after,
.heatmap-range-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 22%,
    rgba(255, 255, 255, 0.38) 48%,
    rgba(255, 255, 255, 0) 74%
  );
  transform: translateX(-110%);
  opacity: 0;
  z-index: -1;
}

.heatmap-range-controls > button:hover,
.heatmap-range-btn:hover {
  color: #f6fcff;
  border-color: rgba(176, 233, 255, 0.74);
  background: linear-gradient(145deg, rgba(106, 191, 255, 0.32), rgba(83, 154, 255, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 20px rgba(118, 202, 255, 0.32);
  transform: translateY(-1px);
}

.heatmap-range-controls > button.is-active,
.heatmap-range-btn.is-active {
  color: #f8fcff;
  border-color: rgba(190, 240, 255, 0.92);
  background: linear-gradient(145deg, rgba(123, 212, 255, 0.56), rgba(87, 160, 255, 0.46));
  box-shadow: 0 0 0 1px rgba(22, 62, 128, 0.82), 0 0 28px rgba(126, 212, 255, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.heatmap-range-controls > button.is-active::after,
.heatmap-range-btn.is-active::after {
  animation: range-glass-sweep 2.7s linear infinite;
}

.heatmap-range-controls > button:focus-visible,
.heatmap-range-btn:focus-visible {
  outline: none;
  border-color: rgba(208, 247, 255, 0.98);
  box-shadow: 0 0 0 1px rgba(26, 82, 170, 0.82), 0 0 0 4px rgba(120, 202, 255, 0.22);
}

.heatmap-board {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: 20px auto;
  gap: 6px 8px;
  overflow-x: auto;
}

.heatmap-corner {
  grid-column: 1;
  grid-row: 1;
  color: var(--blue);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.heatmap-x-labels {
  grid-column: 2;
  grid-row: 1;
  min-width: 950px;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 6px;
}

.heatmap-x-labels span {
  color: #a6c4e3;
  font-size: 0.61rem;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.heatmap-y-labels {
  grid-column: 1;
  grid-row: 2;
  min-width: 58px;
  display: grid;
  grid-template-rows: repeat(7, 30px);
  gap: 6px;
}

.heatmap-y-labels span {
  color: #a8c7e6;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
}

.heatmap {
  grid-column: 2;
  grid-row: 2;
  min-width: 950px;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-rows: repeat(7, 30px);
  gap: 6px;
}

.heat-cell {
  border-radius: 8px;
  border: 1px solid rgba(126, 209, 255, 0.24);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.02);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.heat-cell:hover {
  transform: translateY(-1px) scale(1.01);
  border-color: rgba(149, 221, 255, 0.72);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.08), 0 0 20px rgba(128, 214, 255, 0.2);
}

.heatmap-legend {
  margin: 0;
  color: #a3c3e5;
  font-size: 0.74rem;
}

.heatmap-scale-wrap {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.heatmap-score-gradient {
  height: 12px;
}

.heatmap-scale-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.heatmap-scale-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(140, 206, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 21, 56, 0.68);
  padding: 4px 8px;
}

.heatmap-scale-item .score-label {
  font-size: 0.69rem;
}

.heatmap-scale-item .score-share {
  color: #9fc2e4;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

.heatmap-scale-item .score-chip {
  margin-right: 0;
}

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

.day-list {
  display: grid;
  gap: 8px;
}

.day-item {
  border: 1px solid rgba(138, 209, 255, 0.28);
  border-radius: 10px;
  background: rgba(9, 23, 61, 0.7);
  padding: 8px 10px;
}

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

.day-row strong {
  font-size: 0.82rem;
}

.day-bar {
  margin-top: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(107, 173, 255, 0.2);
  overflow: hidden;
}

.day-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7cb7ff, #89deff);
}

.signal-list {
  display: grid;
  gap: 9px;
}

.edge-hud {
  border: 1px solid rgba(141, 201, 255, 0.28);
  border-radius: 12px;
  padding: 10px 11px;
  background: linear-gradient(155deg, rgba(10, 24, 64, 0.78), rgba(8, 18, 49, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.edge-hud.edge-positive {
  border-color: rgba(121, 247, 196, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 22px rgba(96, 255, 192, 0.12);
}

.edge-hud.edge-neutral {
  border-color: rgba(129, 207, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 22px rgba(126, 187, 255, 0.12);
}

.edge-hud.edge-negative {
  border-color: rgba(255, 133, 176, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 18px rgba(255, 113, 164, 0.11);
}

.edge-grade {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.edge-score {
  margin: 6px 0 0;
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1;
  color: #f2f7ff;
}

.edge-score span {
  font-size: 0.72rem;
  color: #a8c7e8;
  margin-left: 4px;
}

.edge-verdict {
  border-radius: 999px;
  border: 1px solid rgba(132, 215, 255, 0.44);
  padding: 6px 10px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #eaf7ff;
  background: rgba(57, 89, 143, 0.28);
  white-space: nowrap;
}

.edge-note {
  margin: 8px 0 0;
  color: #a6c4e3;
  font-size: 0.75rem;
  line-height: 1.34;
}

.edge-bars {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.edge-bar {
  display: grid;
  gap: 4px;
}

.edge-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #c2def8;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.edge-bar-top strong {
  color: #f2fbff;
  font-size: 0.73rem;
}

.edge-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(86, 141, 210, 0.3);
  overflow: hidden;
}

.edge-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7aa8ff 0%, #79d4ff 55%, #7efee0 100%);
  box-shadow: 0 0 12px rgba(130, 220, 255, 0.2);
}

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

.edge-metric {
  border: 1px solid rgba(138, 204, 255, 0.26);
  border-radius: 10px;
  background: rgba(8, 21, 56, 0.72);
  padding: 8px 9px;
}

.edge-metric .label,
.signal-item .label {
  margin: 0;
  color: #accae8;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.edge-metric .value,
.signal-item .value {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: #f2fbff;
  line-height: 1.25;
}

.edge-metric .meta {
  margin: 4px 0 0;
  color: #9fbfdc;
  font-size: 0.7rem;
  line-height: 1.28;
}

.signal-item {
  border: 1px solid rgba(138, 203, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 21, 56, 0.72);
  padding: 9px 10px;
}

.score-scale {
  display: grid;
  gap: 10px;
}

.score-gradient {
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(141, 213, 255, 0.3);
  background: linear-gradient(
    90deg,
    #ff6f87 0%,
    #9ea6ff 25%,
    #7bcfff 50%,
    #6cedff 75%,
    #7effc3 100%
  );
}

.score-scale-list {
  display: grid;
  gap: 7px;
}

.score-item {
  border: 1px solid rgba(140, 206, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 21, 56, 0.68);
  padding: 8px 10px;
}

.score-item .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.score-chip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 10px currentColor;
}

.score-label {
  font-size: 0.78rem;
}

.score-desc {
  margin: 5px 0 0;
  color: #a7c6e4;
  font-size: 0.73rem;
  line-height: 1.34;
}

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

.hour-list {
  display: grid;
  gap: 8px;
}

.hour-item {
  border: 1px solid rgba(138, 205, 255, 0.24);
  border-radius: 11px;
  background: rgba(8, 21, 58, 0.72);
  padding: 10px 11px;
  transition: transform 120ms ease, border-color 120ms ease;
}

.hour-item:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 229, 255, 0.66);
}

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

.hour-row strong {
  font-size: 0.84rem;
}

.hour-meta {
  margin-top: 4px;
  color: #aac8e6;
  font-size: 0.74rem;
}

.pnl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.pnl-head-copy {
  min-width: 260px;
}

.pnl-definition-note {
  margin: 5px 0 0;
  color: #93b4d8;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.pnl-range-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid rgba(142, 208, 255, 0.36);
  padding: 3px;
  background: linear-gradient(135deg, rgba(8, 22, 60, 0.82), rgba(12, 31, 79, 0.7));
}

.pnl-range-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 10px;
  background: transparent;
  color: #cbe6ff;
  font-family: inherit;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.pnl-range-btn:hover {
  color: #f5fcff;
  border-color: rgba(139, 216, 255, 0.44);
}

.pnl-range-btn.is-active {
  color: #eef8ff;
  border-color: rgba(138, 215, 255, 0.68);
  background: linear-gradient(135deg, rgba(98, 178, 255, 0.32), rgba(70, 146, 255, 0.28));
  box-shadow: 0 0 15px rgba(130, 206, 255, 0.18);
}

.pnl-chart {
  border-radius: var(--radius-md);
  border: 1px solid rgba(136, 202, 255, 0.3);
  background: rgba(7, 20, 54, 0.76);
  min-height: 224px;
  padding: 8px;
}

.pnl-svg {
  width: 100%;
  height: 214px;
  display: block;
}

.pnl-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.pnl-panel {
  display: grid;
  gap: 8px;
  min-height: 292px;
}

.pnl-panel-title {
  margin: 0;
  color: #d2e9ff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-pnl-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(136, 202, 255, 0.32);
  background: linear-gradient(165deg, rgba(8, 19, 47, 0.86), rgba(10, 24, 59, 0.82));
  min-height: 292px;
  padding: 12px 12px 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.daily-pnl-head {
  display: grid;
  gap: 6px;
}

.daily-pnl-label {
  margin: 0;
  color: #b6cce4;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.daily-pnl-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(140deg, #31d889, #77ffd6);
  box-shadow: 0 0 12px rgba(76, 235, 171, 0.45);
}

.daily-pnl-value {
  margin: 0;
  color: #eef8ff;
  font-size: clamp(1.3rem, 2.2vw, 2.05rem);
  font-weight: 760;
  line-height: 1.04;
  text-shadow: 0 0 18px rgba(120, 190, 255, 0.16);
}

.daily-pnl-value.positive {
  color: #e6fff4;
  text-shadow: 0 0 18px rgba(92, 236, 173, 0.24);
}

.daily-pnl-value.negative {
  color: #ffe9f2;
  text-shadow: 0 0 18px rgba(255, 126, 173, 0.24);
}

.daily-pnl-subtitle {
  margin: 0;
  color: #a6c0dd;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

.daily-pnl-note {
  margin: 0;
  color: #8eaed1;
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}

.daily-pnl-chart {
  border-radius: 12px;
  border: 1px solid rgba(128, 194, 255, 0.26);
  background: rgba(6, 17, 44, 0.72);
  padding: 8px;
  min-height: 214px;
}

.daily-pnl-svg {
  width: 100%;
  height: 198px;
  display: block;
}

.market-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
}

.market-item {
  border: 1px solid rgba(138, 202, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 20, 54, 0.72);
  padding: 9px 10px;
  display: grid;
  gap: 4px;
}

.market-title {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.market-meta {
  margin: 0;
  color: #aac8e6;
  font-size: 0.73rem;
}

.pill {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill.positive {
  color: #def8ff;
  border-color: rgba(124, 219, 255, 0.54);
  background: rgba(34, 103, 158, 0.42);
}

.pill.negative {
  color: #ffd1e4;
  border-color: rgba(255, 139, 188, 0.46);
  background: rgba(124, 42, 86, 0.34);
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.gated-card {
  max-width: 460px;
}

.gated-note {
  color: #bedcff;
}

.hover-tooltip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -120%) scale(0.96);
  transition: opacity 100ms ease, transform 100ms ease;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(145, 212, 255, 0.52);
  background: rgba(5, 18, 50, 0.95);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.48);
  color: #edf9ff;
  font-size: 0.75rem;
  line-height: 1.35;
}

.hover-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -132%) scale(1);
}

@media (max-width: 1240px) {
  .liquid-shell {
    padding: 8px;
  }

  .liquid-brand {
    min-width: auto;
  }

  .liquid-tools {
    min-width: auto;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .triple-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .liquid-main-row {
    flex-wrap: wrap;
    gap: 7px;
  }

  .liquid-brand {
    min-width: 142px;
  }

  .brand-name {
    font-size: 0.93rem;
    letter-spacing: 0.058em;
  }

  .liquid-menu {
    order: 4;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .liquid-tools {
    margin-left: auto;
  }

  .control-strip-main {
    gap: 7px;
  }

  .control-group {
    flex: 1 1 100%;
  }

  .control-primary {
    flex-wrap: wrap;
  }

  .control-status {
    justify-content: flex-start;
    margin-left: 0;
  }

  .address-input.liquid-input {
    min-width: 190px;
    width: 100%;
  }

  .wallet-provider-menu {
    left: 0;
    right: auto;
    width: min(320px, calc(100vw - 30px));
    max-width: calc(100vw - 30px);
  }

  .heatmap-range-controls {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .pnl-head {
    align-items: stretch;
  }

  .pnl-range-controls {
    width: 100%;
    justify-content: space-between;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .pnl-panels {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .liquid-main-row {
    gap: 6px;
  }

  .liquid-brand {
    min-width: 0;
    padding-left: 0;
  }

  .brand-name {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
  }

  .menu-item {
    font-size: 0.63rem;
    padding: 6px 8px;
  }

  .top-refresh-btn {
    font-size: 0.62rem;
    padding: 8px 10px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .address-input.liquid-input {
    min-width: 170px;
    width: 100%;
  }

  .control-strip-main {
    gap: 6px;
  }

  .control-group {
    gap: 6px;
    padding: 3px;
  }

  .control-actions {
    flex-wrap: wrap;
  }

  .source-toggle {
    width: 100%;
  }

  .heatmap-range-controls > button,
  .heatmap-range-btn {
    font-size: 0.58rem;
    padding: 6px 7px;
  }

  .edge-grid {
    grid-template-columns: 1fr;
  }

  .pnl-range-btn {
    flex: 1;
    text-align: center;
    padding: 5px 0;
  }
}
