* {
  box-sizing: border-box;
}

:root {
  --bg: #101318;
  --panel: #1b2028;
  --text: #e8e9ed;
  --muted: #a0a6b2;
  --accent: #d6a95a;
  --accent-2: #f0c77a;
  --border: #2b313a;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --num-font: "JetBrains Mono", "IBM Plex Mono", "Fira Code", ui-monospace,
    SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --nav-bg: #161a1f;
  --nav-border: #1f242b;
  --nav-link: #e5e7eb;
  --nav-link-muted: #9ca3af;
  --nav-pill-border: #4b5563;
}

body.light {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #0b1220;
  --muted: #475569;
  --accent: #f59e0b;
  --accent-2: #f97316;
  --border: #f1f5f9;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

a {
  color: #cfd8dc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

body.light a {
  color: #1f2937;
}

body.light a:hover {
  color: #0f172a;
}

.container {
  max-width: 940px;
  padding: 12px;
}

.lp-shell {
  max-width: 860px;
  margin: 0 auto;
}

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

.lp-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(
      120% 160% at 0% 0%,
      rgba(34, 72, 110, 0.35),
      transparent 60%
    ),
    linear-gradient(135deg, rgba(15, 18, 26, 0.95), rgba(20, 24, 34, 0.9));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 12px;
}

body.light .lp-hero {
  background: linear-gradient(135deg, #ffffff, #f3f6fb);
  border-color: #e2e8f0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.lp-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #0f1116;
  border: 1px solid var(--border);
  object-fit: contain;
}

body.light .lp-logo {
  background: #ffffff;
}

.lp-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lp-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.lp-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 15, 21, 0.7);
  color: var(--text);
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #a1a1aa;
}

.pill.ok {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  color: #7cf4b1;
}

.pill.ok .dot {
  background: #22c55e;
}

.pill.warn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #facc15;
}

.pill.warn .dot {
  background: #f59e0b;
}

.pill.bad {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.pill.bad .dot {
  background: #ef4444;
}

body.light .pill {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light .pill.ok {
  background: #ecfdf5;
  border-color: #86efac;
  color: #16a34a;
}

body.light .pill.warn {
  background: #fff7ed;
  border-color: #fcd34d;
  color: #d97706;
}

body.light .pill.bad {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

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

.btn-slim {
  background: #2a2d36;
  color: #ffffff;
  border: 1px solid #343844;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-slim.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #1b2028;
}

.btn-slim:hover {
  text-decoration: none;
  transform: translateY(-1px);
  filter: brightness(1.05);
}

body.light .btn-slim {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.stat {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.stat .lab {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat .val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.grid,
.lp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cardx {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

body.light .cardx,
body.light .stat {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  border-color: #e2e8f0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.h5x {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.period .rowx {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.bar {
  position: relative;
  height: 6px;
  background: #232833;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

body.light .bar {
  background: #e5ebf3;
}

.pct {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.kvs .kv,
.kv-compact .kv {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.kvs .kv:last-child,
.kv-compact .kv:last-child {
  border-bottom: 0;
}

body.light .kvs .kv,
body.light .kv-compact .kv {
  border-bottom-color: #e2e8f0;
}

.amt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pool-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px;
  background: #161a22;
  display: grid;
  gap: 8px;
}

body.light .pool-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.pool-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pool-head-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pool-head-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.asset-ico {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: block;
  border-radius: 999px;
  background: #0f1116;
  border: 1px solid var(--border);
  object-fit: cover;
  overflow: hidden;
}

body.light .asset-ico {
  background: #ffffff;
}

.asset {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-weight: 700;
}

.chip.new {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.pools-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-charts {
  margin-top: 12px;
}

.lp-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lp-chart-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #161a22;
  padding: 10px;
  min-height: 240px;
}

.lp-chart-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.lp-chart-card canvas {
  width: 100% !important;
  height: 190px !important;
}

#rewardChart {
  height: 220px !important;
}

.lp-pool-charts-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 992px) {
  .lp-pool-charts-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lp-pool-chart-card canvas {
  height: 180px !important;
}

.lp-pool-chart-card {
  min-height: 210px;
  padding: 8px;
}

body.light .lp-chart-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

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

.soc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: #141821;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

body.light .soc a {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.soc a:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.stick {
  position: sticky;
  bottom: 0;
  background: rgba(16, 19, 24, 0.85);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 8px;
  display: none;
  z-index: 20;
}

body.light .stick {
  background: rgba(246, 247, 251, 0.9);
}

.lp-stick-actions {
  display: flex;
  gap: 8px;
}

.lp-alert .alert {
  border-radius: 12px;
}

.modal-content {
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  border: 1px solid var(--border);
}

body.light .modal-content {
  background: #ffffff;
  color: #0f172a;
}

.modal-header,
.modal-footer {
  border-color: var(--border) !important;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
}

.form-control {
  background: #0f1116;
  border-color: var(--border);
  color: var(--text);
  border-radius: 10px;
}

body.light .form-control {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.form-text,
.text-muted {
  color: var(--muted) !important;
}

.site-navbar {
  background: var(--nav-bg);
  border-bottom: none;
  box-shadow: none;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

.site-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 14px;
  text-transform: uppercase;
  color: #f9fafb !important;
}

.site-navbar .navbar-brand img {
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.7);
}

.site-navbar .nav-link {
  position: relative;
  font-weight: 500;
  font-size: 14px;
  padding: 0.3rem 0.9rem;
  color: var(--nav-link-muted) !important;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.site-navbar .nav-link:hover {
  color: var(--nav-link) !important;
  opacity: 1;
  text-decoration: none;
  transform: translateY(-1px);
}

.site-navbar .nav-link.active {
  color: var(--nav-link) !important;
}

.site-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.45rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  opacity: 0;
  transition: width 0.15s ease, opacity 0.15s ease;
}

.site-navbar .nav-link.active::after {
  width: 70%;
  opacity: 1;
}

.site-navbar .badge-primary {
  background: var(--accent);
  color: #1b2028;
  font-size: 10px;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
}

.site-navbar .btn-outline-light,
.site-navbar .btn-light {
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
  font-size: 0.8rem;
  border-color: var(--nav-pill-border);
  color: var(--nav-link) !important;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}

.site-navbar .btn-outline-light:hover,
.site-navbar .btn-light:hover {
  background: #f9fafb;
  color: #020617 !important;
  border-color: transparent;
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .site-navbar .navbar-nav {
    text-align: center;
  }

  .site-navbar .navbar-nav.ml-auto {
    margin-top: 0.5rem;
  }
}

.site-footer {
  padding: 18px 14px 28px;
  text-align: center;
  color: var(--text);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer__meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer__brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-footer__social {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.site-footer__social a {
  color: var(--text);
  font-size: 20px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.site-footer__social a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 992px) {
  .grid,
  .lp-grid {
    grid-template-columns: 1fr;
  }

  .lp-chart-grid {
    grid-template-columns: 1fr;
  }

  .lp-pool-charts-box {
    grid-template-columns: 1fr;
  }

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

  .stick {
    display: block;
  }
}

@media (max-width: 640px) {
  .lp-hero {
    padding: 14px;
  }

  .lp-title {
    font-size: 20px;
  }

  .lp-hero-actions {
    width: 100%;
  }

  .lp-hero-actions .btn-slim {
    flex: 1;
    justify-content: center;
  }

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