:root {
  --bg: #07141c;
  --bg-soft: #0e2230;
  --panel: rgba(7, 20, 28, 0.72);
  --panel-strong: rgba(13, 33, 46, 0.92);
  --line: rgba(157, 199, 214, 0.14);
  --text: #edf6f8;
  --muted: #8ba8b1;
  --teal: #4fd1c5;
  --mint: #91f2c3;
  --gold: #f3b562;
  --danger: #ff8f70;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "DIN Alternate", "PingFang SC", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(79, 209, 197, 0.2), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(243, 181, 98, 0.14), transparent 24%),
    linear-gradient(180deg, #07141c 0%, #0b1b26 45%, #102432 100%);
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.28;
  pointer-events: none;
}

.ambient-a {
  width: 280px;
  height: 280px;
  top: 110px;
  left: -60px;
  background: rgba(79, 209, 197, 0.35);
}

.ambient-b {
  width: 320px;
  height: 320px;
  right: -80px;
  bottom: 60px;
  background: rgba(243, 181, 98, 0.2);
}

.page {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero,
.layout {
  display: grid;
  gap: 18px;
}

.hero {
  grid-template-columns: 1.45fr 0.9fr;
  align-items: stretch;
}

.hero-copy,
.hero-status,
.panel,
.metric-card,
.top-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy,
.hero-status,
.panel {
  border-radius: 30px;
  padding: 26px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3,
.metric-value {
  font-family: "Avenir Next Condensed", "PingFang SC", sans-serif;
}

h1 {
  margin: 0;
  line-height: 0.95;
  font-size: clamp(38px, 6vw, 76px);
}

.subtitle,
.panel-head p,
.status-line,
.status-tip,
.mini-item p {
  color: var(--muted);
}

.hero-status {
  background:
    linear-gradient(160deg, rgba(79, 209, 197, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(13, 33, 46, 0.96), rgba(7, 20, 28, 0.86));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(243, 181, 98, 0.18);
  color: var(--gold);
}

.status-pill.live {
  background: rgba(145, 242, 195, 0.16);
  color: var(--mint);
}

.status-pill.error {
  background: rgba(255, 143, 112, 0.16);
  color: var(--danger);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.metric-card {
  border-radius: 24px;
  padding: 20px;
}

.metric-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-value {
  display: block;
  margin-top: 14px;
  font-size: clamp(28px, 5vw, 52px);
}

.layout {
  grid-template-columns: 1.3fr 0.8fr;
}

.panel {
  border-radius: 28px;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 28px;
}

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

.top-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 22px;
  padding: 18px;
  background: var(--panel-strong);
}

.top-rank {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.18), rgba(79, 209, 197, 0.04));
  color: var(--mint);
  font-weight: 800;
}

.top-main h3,
.mini-item strong {
  margin: 0;
  font-size: 18px;
}

.top-main p,
.mini-item p {
  margin: 6px 0 0;
  font-size: 13px;
}

.top-metric {
  text-align: right;
}

.top-metric span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.top-metric strong,
.mini-values span:first-child {
  color: var(--gold);
  font-size: 28px;
}

.mini-feed {
  display: grid;
  gap: 12px;
}

.mini-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mini-item:last-child {
  border-bottom: 0;
}

.mini-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.mini-values span:last-child {
  color: var(--mint);
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.filter-field {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
}

.filter-field span {
  font-size: 13px;
  color: var(--muted);
}

.filter-dropdown {
  position: relative;
}

.filter-dropdown summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.filter-dropdown summary::-webkit-details-marker {
  display: none;
}

.filter-dropdown[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.filter-options {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  background: #102432;
  box-shadow: var(--shadow);
}

.filter-search {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.filter-search::placeholder {
  color: var(--muted);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  color: var(--text);
}

.filter-option input {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.sort-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sort-button[data-active="1"] {
  color: var(--mint);
}

.sort-button[data-direction="desc"]::after {
  content: " ↓";
}

.sort-button[data-direction="asc"]::after {
  content: " ↑";
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pager-info {
  color: var(--muted);
  font-size: 13px;
}

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

.pager-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.pager-button.active {
  background: rgba(79, 209, 197, 0.14);
  color: var(--mint);
}

.pager-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .layout,
  .metrics,
  .cards {
    grid-template-columns: 1fr;
  }

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

  .table-toolbar {
    justify-content: stretch;
  }
}
