﻿:root {
  --bg: #04060b;
  --bg-soft: #080c14;
  --panel: #0d121c;
  --panel-2: #121929;
  --panel-3: #0f1522;
  --line: #1a2234;
  --line-strong: #27324b;
  --text: #f3f7ff;
  --muted: #9ea9bd;
  --muted-2: #b7c2d6;
  --accent: #2b7fff;
  --accent-2: #1a56bf;
  --good: #00d26a;
  --danger: #ff4b57;
  --warn: #ffd13d;
  --radius-xxl: 24px;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-lg: 0 26px 54px rgba(0, 0, 0, 0.52);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 82% -12%, rgba(43, 127, 255, 0.16), transparent 64%),
    radial-gradient(900px 450px at -8% 108%, rgba(43, 127, 255, 0.08), transparent 66%),
    linear-gradient(180deg, #03050a 0%, #050912 36%, #04060b 100%);
  line-height: 1.54;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: 0;
}

body::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 30%, #000 34%, transparent 88%);
}

body::after {
  background: radial-gradient(580px 300px at 70% 4%, rgba(32, 98, 214, 0.2), transparent 68%);
}

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

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

.layout {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  border: 0;
  border-right: 1px solid #172035;
  border-radius: 0;
  background: linear-gradient(180deg, #060a12 0%, #050811 100%);
  box-shadow: none;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #edf3ff;
  display: grid;
  place-items: center;
  transition: 0.2s ease;
}

.brand-logo:hover {
  border-color: #1f2b44;
  background: #0b111d;
}

.logo-mark {
  width: 32px;
  height: 32px;
}

.nav-main {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 18px;
}

.icon-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #8b9bb9;
  background: transparent;
  display: grid;
  place-items: center;
  transition: all 0.22s ease;
}

.icon-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.icon-link:hover {
  color: #e8f0ff;
  border-color: #1f2c47;
  background: #0d1525;
}

.icon-link.active {
  color: #ffffff;
  border-color: #2f78e8;
  background: linear-gradient(180deg, #0f2f5e 0%, #12366b 100%);
  box-shadow: inset 0 1px 0 rgba(130, 181, 255, 0.2), 0 9px 20px rgba(17, 52, 105, 0.42);
}

.content {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 24px 30px 34px;
  width: min(1580px, 100%);
  margin-inline: auto;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xxl);
  background: linear-gradient(180deg, rgba(14, 20, 31, 0.94) 0%, rgba(10, 15, 24, 0.9) 100%);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  padding: 26px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 200px;
  background: radial-gradient(520px 140px at 25% 0%, rgba(43, 127, 255, 0.1), transparent 74%);
  pointer-events: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Unbounded", "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.56rem, 2.7vw, 2.24rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.04rem, 1.75vw, 1.36rem);
  line-height: 1.2;
}

h3 {
  font-size: 0.98rem;
  line-height: 1.25;
}

.eyebrow {
  margin: 0;
  color: #8fa4c9;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-plain {
  color: #f4f8ff;
}

.text-accent {
  color: #3a8dff;
}

.hero-panel {
  padding: 28px;
}

.hero-panel-compact {
  padding: 24px 28px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: block;
}

.hero-copy {
  display: grid;
  gap: 16px;
  max-width: 980px;
  min-height: auto;
}

.hero-description {
  margin: 0;
  max-width: 620px;
  color: var(--muted-2);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel-note {
  position: relative;
  z-index: 1;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.89rem;
}

.primary-btn,
.secondary-btn,
.ghost-link,
.show-more,
#clearBtn,
.chip-tab {
  border-radius: 11px;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.91rem;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(43, 127, 255, 0.32);
}

.primary-btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.secondary-btn,
.ghost-link,
.show-more,
#clearBtn,
.chip-tab {
  color: #dce7fa;
  background: #131b2b;
  border-color: #27324a;
}

.secondary-btn:hover,
.ghost-link:hover,
.show-more:hover,
#clearBtn:hover,
.chip-tab:hover {
  background: #1b263a;
  border-color: #3b5684;
}

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

.count-pill {
  border-radius: 999px;
  border: 1px solid #263145;
  background: #0f1624;
  color: #c8d6f1;
  font-size: 0.79rem;
  font-weight: 700;
  padding: 6px 11px;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-tab {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.84rem;
  border-radius: 10px;
}

.chip-tab.active {
  color: #ffffff;
  border-color: #4c97ff;
  background: linear-gradient(180deg, #3486ff 0%, #256ad7 100%);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 20px;
}

.wallet-panel,
.history-panel,
.preview-panel,
.filter-panel,
.metrics-panel,
.prices-table-panel,
.codex-main {
  display: grid;
  gap: 14px;
}

.bank-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid #3662ad;
  min-height: 176px;
  padding: 18px;
  background:
    radial-gradient(380px 150px at 80% 10%, rgba(101, 151, 255, 0.34), transparent 70%),
    linear-gradient(135deg, #0c1c34 0%, #173768 100%);
  color: #f4f9ff;
  display: grid;
  align-content: space-between;
  gap: 18px;
  box-shadow: inset 0 1px 0 rgba(177, 213, 255, 0.2), 0 14px 34px rgba(13, 32, 61, 0.48);
}

.bank-top,
.bank-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bank-top strong,
.bank-bottom strong {
  font-size: 1.16rem;
  font-weight: 800;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(173, 208, 255, 0.42);
  background: rgba(9, 20, 36, 0.42);
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 700;
}

.wallet-actions {
  display: grid;
  gap: 10px;
}

.search-lite {
  border-radius: var(--radius-md);
  border: 1px solid #223049;
  background: #0f1725;
  color: var(--muted);
  padding: 12px 14px;
  font-size: 0.94rem;
}

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

.history-item {
  border: 1px solid #202c41;
  border-radius: 14px;
  background: #0e1523;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.history-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.history-left p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid #263651;
  background: #121d2f;
  color: #e5efff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.79rem;
}

.delta {
  font-size: 1.06rem;
  font-weight: 700;
  white-space: nowrap;
}

.delta.positive {
  color: var(--good);
}

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

.prices-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.search-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #202d45;
  background: #0e1523;
  border-radius: 12px;
  padding: 10px 10px 10px 14px;
}

.search-icon {
  color: #8e9eb9;
  font-size: 1rem;
  user-select: none;
}

#searchInput {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.98rem;
}

#searchInput::placeholder {
  color: #7c8da9;
}

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

.control-grid label {
  display: grid;
  gap: 6px;
}

.control-grid span {
  color: var(--muted);
  font-size: 0.79rem;
}

select {
  width: 100%;
  height: 44px;
  border: 1px solid #25334d;
  border-radius: 11px;
  background: #121b2b;
  padding: 0 11px;
  outline: none;
}

select:focus {
  border-color: #4471b6;
}

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

.stat-list > div {
  border-radius: 12px;
  border: 1px solid #202d45;
  background: #101828;
  padding: 11px 12px;
  display: grid;
  gap: 2px;
}

.stat-list span {
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-list strong {
  font-size: 1.04rem;
  font-weight: 800;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.table-wrap {
  border: 1px solid #202d45;
  border-radius: 14px;
  overflow: auto;
  background: #0e1523;
}

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

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 12px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 750;
  color: #d4e4ff;
  background: #0d1422;
  border-bottom: 1px solid #1f2d45;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody td {
  padding: 14px 12px;
  font-size: 0.93rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(43, 127, 255, 0.08);
}

.item-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.item-media {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  border: 1px solid #2a3b58;
  background: #111a2a;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.item-media::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d8e8ff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  opacity: 0;
}

.item-media.fallback::after {
  opacity: 1;
}

.item-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.item-icon.missing {
  display: none;
}

.item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.item strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.item small {
  color: #8ea0bf;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #2d3a53;
  background: #131d30;
  color: #d2def1;
  font-size: 0.73rem;
  padding: 3px 10px;
}

.badge.farm {
  border-color: rgba(0, 210, 106, 0.45);
  color: #5fe2a0;
}

.badge.limit {
  border-color: rgba(255, 209, 61, 0.45);
  color: #ffe180;
}

.price {
  font-weight: 800;
  color: #74b3ff;
}

.price.unknown {
  color: #ffc277;
  text-transform: lowercase;
}

.table-footer {
  display: flex;
  justify-content: center;
}

.show-more[hidden] {
  display: none;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 22px 12px;
}

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

.mini-card {
  border-radius: 14px;
  border: 1px solid #1f2b41;
  background: #0e1624;
  padding: 18px;
}

.mini-card.wide {
  grid-column: span 3;
}

.mini-card p {
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 0.87rem;
}

.mini-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.mini-card li {
  font-size: 0.85rem;
  color: #d4def1;
}

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

.split-lists p {
  margin: 0;
  font-size: 0.84rem;
  color: #e6efff;
}

.article-list {
  margin-top: 9px;
  display: grid;
  gap: 8px;
}

.article-item {
  border-radius: 10px;
  border: 1px solid #26354f;
  background: #101a2b;
  padding: 10px;
}

.article-item strong {
  display: block;
  font-size: 0.86rem;
}

.article-item p {
  margin-top: 6px;
  color: #c1cae0;
  font-size: 0.83rem;
}

.anti-card {
  border-color: rgba(43, 127, 255, 0.6);
}

.mini-table-wrap {
  margin-top: 10px;
  border-radius: 11px;
  border: 1px solid #22314a;
  overflow: auto;
  background: #0c131f;
}

.mini-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 9px 10px;
  text-align: left;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-table thead th {
  font-size: 0.71rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d7e5fd;
  background: #111a2a;
}

.mini-table.sanctions {
  min-width: 720px;
}

.activity-map {
  display: grid;
  grid-template-columns: repeat(34, 1fr);
  gap: 4px;
}

.activity-cell {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #1a2538;
}

.activity-cell.hot {
  background: #2c86ff;
}

@media (max-width: 1360px) {
  .dashboard-grid,
  .prices-top-grid {
    grid-template-columns: 1fr;
  }

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

  .mini-card.wide {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #172035;
    border-radius: 0;
    padding: 10px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .nav-main {
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
  }

  .content {
    padding: 16px 14px 20px;
  }
}

@media (max-width: 760px) {
  .panel,
  .hero-panel,
  .hero-panel-compact {
    padding: 16px;
  }

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

  .search-wrap {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #clearBtn {
    grid-column: 1 / -1;
  }

  .table-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .mini-card.wide {
    grid-column: span 1;
  }

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

  .history-item,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
