:root {
  --bg: #030303;
  --bg-soft: #070707;
  --panel: #0a0a0a;
  --panel-2: #0d0d0d;

  --gold: #d4af37;
  --gold-rich: #c59b2a;
  --gold-light: #ead27a;
  --gold-dark: #745815;
  --gold-border: rgba(212,175,55,.24);
  --gold-glow: rgba(212,175,55,.10);

  --text: #f5f1e7;
  --muted: #8f8b80;
  --line: rgba(255,255,255,.065);

  --green: #38c98b;
  --red: #ef6464;

  --sidebar: 245px;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% -10%, rgba(212,175,55,.08), transparent 28%),
    #030303;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  z-index: 50;

  display: flex;
  flex-direction: column;

  background:
    linear-gradient(180deg, rgba(212,175,55,.035), transparent 22%),
    #060606;

  border-right: 1px solid var(--gold-border);
}

.brand {
  height: 92px;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 12px;

  color: #050505;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.5px;

  background:
    linear-gradient(145deg, #f1dc88 0%, #d4af37 38%, #967018 100%);

  border: 1px solid #e4c75f;
  box-shadow:
    0 0 0 3px rgba(212,175,55,.06),
    0 8px 30px rgba(212,175,55,.12);
}

.brand-name {
  color: var(--gold-light);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.brand-sub {
  margin-top: 3px;
  color: #6f6959;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
}

.nav {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  min-height: 47px;
  padding: 0 14px;
  border-radius: 10px;

  display: flex;
  align-items: center;
  gap: 13px;

  color: #77736a;
  border: 1px solid transparent;

  font-size: 13px;
  font-weight: 700;

  transition: .2s ease;
}

.nav-item:hover {
  color: var(--gold-light);
  background: rgba(212,175,55,.04);
  border-color: rgba(212,175,55,.10);
}

.nav-item.active {
  color: var(--gold-light);
  background:
    linear-gradient(90deg, rgba(212,175,55,.12), rgba(212,175,55,.025));
  border-color: rgba(212,175,55,.17);
  box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 16px;
}

.engine-mini {
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;

  background: #090909;
  border: 1px solid var(--gold-border);
  border-radius: 12px;
}

.engine-mini strong {
  display: block;
  color: #d5c68e;
  font-size: 10px;
  letter-spacing: .8px;
}

.engine-mini small {
  display: block;
  margin-top: 3px;
  color: #656158;
  font-size: 9px;
}

.pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(212,175,55,.45);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(212,175,55,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212,175,55,0);
  }
}

.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  padding: 28px;
}

.topbar {
  min-height: 66px;
  margin-bottom: 26px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow,
.section-tag {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
}

.topbar h1 {
  margin: 5px 0 0;
  font-size: clamp(23px, 2vw, 31px);
  line-height: 1.1;
  letter-spacing: -.8px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-pill,
.mode-pill,
.safe-badge,
.count-badge {
  min-height: 34px;
  padding: 0 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border-radius: 9px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .9px;
}

.status-pill {
  color: #d4c68e;
  background: #090909;
  border: 1px solid var(--gold-border);
}

.mode-pill {
  color: #090909;
  background: linear-gradient(135deg, #e5ca67, #b8891f);
  border: 1px solid #e0c55c;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(56,201,139,.45);
}

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

.metric-card,
.panel {
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(145deg, rgba(212,175,55,.018), transparent 35%),
    var(--panel);

  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 55%;
  height: 1px;
  background: linear-gradient(90deg, rgba(212,175,55,.55), transparent);
  opacity: .45;
}

.metric-card {
  min-height: 126px;
  padding: 19px;
}

.metric-card:hover,
.panel:hover {
  border-color: rgba(212,175,55,.16);
}

.metric-label {
  color: #716d64;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.metric-value {
  margin-top: 13px;
  color: #f2eee4;
  font-size: clamp(25px,2vw,33px);
  font-weight: 800;
  letter-spacing: -1.3px;
}

.metric-value small {
  color: #5f5b52;
  font-size: 13px;
  letter-spacing: 0;
}

.metric-foot {
  margin-top: 7px;
  font-size: 10px;
}

.gold-text {
  color: var(--gold);
}

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

.intelligence-card {
  border-color: rgba(212,175,55,.20);
  background:
    radial-gradient(circle at 85% 15%, rgba(212,175,55,.11), transparent 38%),
    #0a0a09;
}

.ai-state {
  margin-top: 13px;
  color: var(--gold-light);
  font-size: 27px;
  font-weight: 950;
  letter-spacing: 2px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px,.72fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  padding: 19px;
}

.panel-head {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin-bottom: 18px;
}

.panel h2 {
  margin: 5px 0 0;
  font-size: 16px;
  letter-spacing: -.2px;
}

.range-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.range-tabs button {
  padding: 6px 8px;
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  color: #66625a;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
}

.range-tabs button.selected {
  color: #070707;
  background: var(--gold);
}

.chart-placeholder {
  position: relative;
  height: 285px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,.08);

  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    #060606;

  background-size: 52px 52px;
}

.chart-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -65px;
  height: 160px;
  background: radial-gradient(ellipse, rgba(212,175,55,.10), transparent 65%);
}

.chart-line {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 52%;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--gold-dark) 10%,
      var(--gold) 35%,
      var(--gold-light) 55%,
      var(--gold) 75%,
      transparent
    );

  opacity: .48;
  transform: skewY(-3deg);
  box-shadow: 0 0 12px rgba(212,175,55,.16);
}

.chart-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.chart-message strong {
  color: #bfa75c;
  font-size: 11px;
  letter-spacing: 1.8px;
}

.chart-message span {
  margin-top: 6px;
  color: #56534d;
  font-size: 10px;
}

.safe-badge,
.count-badge {
  color: var(--gold-light);
  background: rgba(212,175,55,.07);
  border: 1px solid rgba(212,175,55,.18);
}

.btc-price {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.btc-price span {
  display: block;
  color: #68645c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.btc-price strong {
  display: block;
  margin-top: 7px;
  color: var(--gold-light);
  font-size: 25px;
  letter-spacing: -.7px;
}

.regime-list {
  margin-top: 12px;
}

.regime-list > div {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.regime-list span {
  color: #706c63;
  font-size: 10px;
}

.regime-list strong {
  color: #bdb8ab;
  font-size: 10px;
  letter-spacing: .5px;
}

.scanner-panel {
  margin-bottom: 14px;
}

.scan-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #777167;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .7px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th {
  padding: 11px 12px;
  text-align: left;
  color: #666158;
  background: #070707;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 1px;
}

td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: #c3beb1;
  font-size: 11px;
}

.empty-row td {
  padding: 0;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-content: center;
  text-align: center;
}

.empty-state strong,
.empty-large strong {
  color: #b4a777;
  font-size: 11px;
  letter-spacing: .5px;
}

.empty-state span,
.empty-large span {
  margin-top: 6px;
  color: #5c5851;
  font-size: 10px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(300px,.7fr);
  gap: 14px;
}

.empty-large {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gold-orb {
  width: 50px;
  height: 50px;
  margin-bottom: 13px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  color: var(--gold-light);
  border: 1px solid rgba(212,175,55,.30);
  background: radial-gradient(circle, rgba(212,175,55,.12), #070707 65%);
  box-shadow: 0 0 30px rgba(212,175,55,.07);

  font-size: 11px;
  font-weight: 900;
}

.health-list {
  display: flex;
  flex-direction: column;
}

.health-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.045);
  color: #77736b;
  font-size: 10px;
}

.health-item > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.health-item strong {
  color: #b7ad89;
  font-size: 9px;
  letter-spacing: .5px;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.health-dot.online {
  background: var(--green);
  box-shadow: 0 0 7px rgba(56,201,139,.35);
}

.health-dot.waiting {
  background: var(--gold);
  box-shadow: 0 0 7px rgba(212,175,55,.28);
}

footer {
  min-height: 75px;
  padding: 20px 4px 4px;

  display: flex;
  align-items: flex-end;
  gap: 14px;

  color: #4e4b45;
  font-size: 9px;
}

footer strong {
  color: #8d7c43;
  letter-spacing: 1px;
}

.mobile-nav {
  display: none;
}


/* TABLET */

@media (max-width: 1100px) {

  :root {
    --sidebar: 205px;
  }

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

  .dashboard-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}


/* MOBILE */

@media (max-width: 760px) {

  body {
    padding-bottom: 74px;
  }

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    padding: 18px 13px;
  }

  .topbar {
    align-items: flex-start;
    margin-bottom: 19px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .top-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .status-pill {
    display: none;
  }

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

  .metric-card {
    min-height: 112px;
    padding: 14px;
    border-radius: 13px;
  }

  .metric-value {
    font-size: 23px;
  }

  .ai-state {
    font-size: 20px;
  }

  .panel {
    padding: 14px;
    border-radius: 13px;
  }

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

  .range-tabs {
    max-width: 165px;
    overflow-x: auto;
  }

  .range-tabs button {
    padding: 6px;
  }

  .chart-placeholder {
    height: 230px;
  }

  .scan-status {
    display: none;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 100;
    left: 10px;
    right: 10px;
    bottom: 10px;

    height: 62px;
    padding: 6px;

    display: grid;
    grid-template-columns: repeat(4,1fr);

    background: rgba(8,8,8,.96);
    border: 1px solid rgba(212,175,55,.24);
    border-radius: 16px;
    box-shadow: 0 -10px 40px rgba(0,0,0,.5);
    backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    color: #68645c;
    border-radius: 10px;
    font-size: 14px;
  }

  .mobile-nav a span {
    font-size: 8px;
    font-weight: 800;
  }

  .mobile-nav a.active {
    color: var(--gold-light);
    background: rgba(212,175,55,.07);
  }
}


@media (max-width: 430px) {

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

  .metric-label {
    font-size: 8px;
  }

  .metric-value {
    font-size: 20px;
  }

  .metric-foot {
    font-size: 9px;
  }

  .panel h2 {
    font-size: 15px;
  }
}

/* HV-AI-BOT scanner states */

.positive {
  color: #49d98a;
  font-weight: 700;
}

.negative {
  color: #ff6464;
  font-weight: 700;
}

.buy-badge,
.control-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .7px;
}

.buy-badge {
  color: #63efa0;
  border: 1px solid rgba(99,239,160,.38);
  background: rgba(99,239,160,.08);
}

.control-badge {
  color: #d8bd73;
  border: 1px solid rgba(216,189,115,.28);
  background: rgba(216,189,115,.06);
}
