:root {
  --canvas: #060912;
  --canvas-2: #0a1120;
  --surface: rgba(9, 16, 31, 0.86);
  --surface-2: rgba(14, 23, 43, 0.96);
  --surface-3: rgba(18, 32, 56, 0.96);
  --border: rgba(102, 145, 190, 0.16);
  --text: #edf4ff;
  --muted: #8fa6c6;
  --accent: #41f2b5;
  --accent-2: #5f8dff;
  --warning: #ffbf60;
  --danger: #ff666e;
  --purple: #a36bff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Space Grotesk", "Avenir Next Condensed", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at 82% 12%, rgba(95, 141, 255, 0.2), transparent 26%),
    radial-gradient(circle at 16% 10%, rgba(65, 242, 181, 0.08), transparent 28%),
    linear-gradient(180deg, #08101d 0%, #050811 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--display);
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: rgba(4, 9, 18, 0.85);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(143, 166, 198, 0.14);
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin: 22px 0 20px;
}

.sidebar-nav a,
.mobile-nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sidebar-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: var(--text);
  border-color: rgba(65, 242, 181, 0.22);
  background: linear-gradient(90deg, rgba(65, 242, 181, 0.14), rgba(95, 141, 255, 0.1));
}

.sidebar-note {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(12, 19, 35, 0.92);
  border: 1px solid rgba(143, 166, 198, 0.14);
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.app {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.topbar-copy h1 {
  margin: 6px 0 0;
  max-width: 14ch;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(65, 242, 181, 0.28);
  background: rgba(65, 242, 181, 0.1);
  color: var(--accent);
  white-space: nowrap;
}

.ghost-button,
.solid-button {
  border: 1px solid rgba(143, 166, 198, 0.18);
  background: rgba(12, 20, 36, 0.9);
  color: var(--text);
  padding: 11px 15px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.solid-button {
  background: linear-gradient(90deg, rgba(65, 242, 181, 0.16), rgba(95, 141, 255, 0.22));
  border-color: rgba(95, 141, 255, 0.28);
}

.hero {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-visual {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 17, 32, 0.95), rgba(7, 12, 24, 0.94));
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
}

.hero-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-family: var(--mono);
}

.hero-copy h2 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-text {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 64ch;
}

.hero-visual {
  overflow: hidden;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.global-alert {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 102, 110, 0.22);
  background: rgba(64, 14, 18, 0.58);
}

.alert-label {
  color: #ffb9bf;
  font-weight: 700;
  white-space: nowrap;
}

.alert-text {
  color: #ffd4d7;
  line-height: 1.6;
}

.dashboard-grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.grid-two {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.15fr 0.85fr;
}

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

.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px 0;
}

.panel-title {
  margin: 0;
  font-size: 1.05rem;
}

.panel-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel-body {
  padding: 20px 22px 22px;
}

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

.metric-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(14, 24, 46, 0.92);
  border: 1px solid rgba(143, 166, 198, 0.14);
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

.metric-value {
  margin-top: 10px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.heatmap-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.heat-cell {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(143, 166, 198, 0.16);
  position: relative;
  overflow: hidden;
}

.heat-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.12), transparent 18%),
    radial-gradient(circle at 28% 112%, rgba(255, 255, 255, 0.08), transparent 24%);
  pointer-events: none;
}

.heat-green {
  background: linear-gradient(180deg, rgba(12, 53, 45, 0.88), rgba(11, 24, 28, 0.88));
}

.heat-yellow {
  background: linear-gradient(180deg, rgba(88, 68, 17, 0.92), rgba(22, 18, 8, 0.92));
}

.heat-orange {
  background: linear-gradient(180deg, rgba(92, 42, 14, 0.92), rgba(25, 15, 8, 0.92));
}

.heat-red {
  background: linear-gradient(180deg, rgba(82, 20, 25, 0.92), rgba(26, 10, 11, 0.92));
}

.heat-purple {
  background: linear-gradient(180deg, rgba(58, 25, 91, 0.9), rgba(17, 11, 28, 0.92));
}

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

.heat-symbol {
  font-size: 1.25rem;
  font-weight: 700;
}

.radar-arc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: currentColor;
  border-right-color: currentColor;
  opacity: 0.8;
}

.heat-number {
  margin-top: 14px;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.heat-meta {
  margin-top: 8px;
  color: rgba(237, 244, 255, 0.72);
  line-height: 1.55;
  font-size: 0.92rem;
}

.feed-list,
.whale-list,
.opportunity-list,
.timeline-list,
.watchlist-list {
  display: grid;
  gap: 12px;
}

.feed-item,
.whale-item,
.opportunity-card,
.timeline-item,
.watchlist-item,
.mini-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(14, 24, 46, 0.92);
  border: 1px solid rgba(143, 166, 198, 0.14);
}

.feed-head,
.whale-head,
.opportunity-head,
.watchlist-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.feed-title,
.opportunity-title {
  margin: 0;
  font-size: 1rem;
}

.feed-meta,
.whale-meta,
.muted-line {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid rgba(143, 166, 198, 0.16);
  white-space: nowrap;
}

.pill-high {
  color: #ffd0d3;
  background: rgba(82, 20, 25, 0.76);
}

.pill-medium {
  color: #ffe3b1;
  background: rgba(92, 42, 14, 0.76);
}

.pill-low {
  color: #bef7df;
  background: rgba(12, 53, 45, 0.76);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(143, 166, 198, 0.1);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(95, 141, 255, 0.07);
}

.symbol-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(143, 166, 198, 0.16);
}

.mono {
  font-family: var(--mono);
}

.number-negative {
  color: var(--warning);
}

.number-positive {
  color: var(--accent);
}

.danger {
  color: var(--danger);
}

.purple {
  color: var(--purple);
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters input,
.filters select,
.chat-input,
.settings-input {
  border: 1px solid rgba(143, 166, 198, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 14, 25, 0.9);
  color: var(--text);
}

.filters input {
  min-width: 220px;
}

.agent-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 340px minmax(0, 1fr);
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(143, 166, 198, 0.16);
  background: rgba(14, 24, 46, 0.88);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
}

.chat-log {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}

.chat-bubble {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(143, 166, 198, 0.16);
  background: rgba(14, 24, 46, 0.92);
  line-height: 1.65;
}

.chat-bubble.user {
  border-left: 3px solid var(--accent-2);
}

.chat-bubble.agent {
  border-left: 3px solid var(--accent);
}

.chat-composer {
  display: grid;
  gap: 10px;
}

.chat-input {
  min-height: 110px;
  max-height: 220px;
  resize: vertical;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 9, 0.68);
  backdrop-filter: blur(6px);
}

.detail-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(720px, 100vw);
  background: #07101d;
  border-left: 1px solid rgba(143, 166, 198, 0.16);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.44);
  display: grid;
  grid-template-rows: auto 1fr;
}

.detail-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(143, 166, 198, 0.12);
}

.detail-header h3 {
  margin: 4px 0 0;
  font-size: 1.65rem;
}

.detail-body {
  overflow: auto;
  padding: 20px 24px 120px;
  display: grid;
  gap: 16px;
}

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

.chart-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 17, 32, 0.96);
  border: 1px solid rgba(143, 166, 198, 0.14);
}

.chart-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chart-toggle {
  border-radius: 999px;
  border: 1px solid rgba(143, 166, 198, 0.14);
  padding: 8px 10px;
  background: rgba(14, 24, 46, 0.92);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.chart-toggle.active {
  color: var(--text);
  border-color: rgba(65, 242, 181, 0.26);
}

.sparkline {
  width: 100%;
  height: 220px;
}

.section-list {
  display: grid;
  gap: 12px;
}

.hidden {
  display: none !important;
}

.loading-copy,
.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1180px) {
  .grid-two,
  .agent-layout,
  .hero {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .app {
    padding: 18px 18px 92px;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid rgba(143, 166, 198, 0.14);
    background: rgba(6, 9, 18, 0.94);
    backdrop-filter: blur(12px);
    z-index: 20;
  }

  .mobile-nav a {
    justify-content: center;
    padding: 10px 8px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.84rem;
  }

  .mobile-nav a.active {
    color: var(--text);
    background: rgba(95, 141, 255, 0.12);
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
  }

  .grid-three,
  .detail-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .global-alert {
    grid-template-columns: 1fr;
  }

  .topbar-copy h1 {
    max-width: 100%;
  }

  .filters {
    flex-direction: column;
  }

  .filters input,
  .filters select {
    width: 100%;
  }
}
