.dash-body {
  margin: 0;
  background: #020617;
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text","Segoe UI",sans-serif;
}

.dash-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 60%),
    radial-gradient(circle at bottom right, rgba(129,140,248,0.22), transparent 60%),
    #020617;
}

/* sidebar */

.dash-sidebar {
  border-right: 1px solid rgba(15,23,42,1);
  padding: 1.6rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,1));
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dash-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 160deg,#22d3ee,#6366f1,#a855f7,#22d3ee);
  box-shadow: 0 0 0 1px rgba(15,23,42,1);
  font-weight: 700;
  font-size: 0.9rem;
}

.dash-logo-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f9fafb;
}

.dash-menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dash-menu-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.55rem;
  border-radius: 999px;
  font-size: 0.86rem;
  color: #9ca3af;
  text-decoration: none;
}

.dash-menu-item .dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148,163,184,0.8);
}

.dash-menu-item.active {
  background: radial-gradient(circle at left, rgba(56,189,248,0.28), transparent 70%);
  color: #e5e7eb;
}

.dash-menu-item.active .dot-mini {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.35);
}

.dash-menu-item.subtle {
  opacity: 0.7;
}

.dash-sidebar-foot {
  margin-top: auto;
  font-size: 0.75rem;
  color: #6b7280;
}

/* main */

.dash-main {
  padding: 1.8rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15,23,42,1);
}

.dash-top-left h1 {
  margin: 0 0 0.3rem;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.dash-top-left p {
  margin: 0;
  font-size: 0.86rem;
  color: #9ca3af;
}

.dash-top-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.pill-btn {
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.78rem;
  border: 1px solid rgba(148,163,184,0.5);
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,1));
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
}

.pill-live {
  border-color: rgba(34,197,94,0.7);
}

.pill-ghost {
  border-color: rgba(148,163,184,0.5);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle at center,#4ade80,#16a34a);
  box-shadow: 0 0 0 4px rgba(34,197,94,0.35);
}

/* grid */

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 0.4rem;
}

.dash-card {
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.5);
  background: radial-gradient(circle at top left, rgba(15,23,42,0.98), rgba(15,23,42,1));
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 16px 50px rgba(15,23,42,0.9);
}

.dash-card.span-2 {
  grid-column: span 2;
}

.dash-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.dash-card-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.dash-card-header p {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.dash-tabs {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(51,65,85,1);
  padding: 2px;
}

.tab {
  border-radius: 999px;
  border: none;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.tab.active {
  background: radial-gradient(circle at top, rgba(56,189,248,0.95), rgba(37,99,235,1));
  color: #020617;
}

/* chart */

.dash-chart {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.6);
  height: 190px;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,1));
}

.dash-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.16) 1px, transparent 1px),
    linear-gradient(to top, rgba(148,163,184,0.16) 1px, transparent 1px);
  background-size: 32px 32px;
}

.dash-line {
  position: absolute;
  inset-inline: 8%;
  bottom: 10%;
  height: 60%;
  opacity: 0.9;
}

.line-a {
  background: linear-gradient(to right, rgba(56,189,248,0.08), rgba(56,189,248,0.9));
  clip-path: polygon(
    0% 78%, 12% 58%, 24% 66%, 36% 46%, 48% 54%, 60% 36%, 72% 42%, 84% 26%, 100% 30%,
    100% 100%, 0% 100%
  );
}

.line-b {
  background: linear-gradient(to right, rgba(129,140,248,0.08), rgba(129,140,248,0.85));
  clip-path: polygon(
    0% 88%, 12% 72%, 24% 80%, 36% 60%, 48% 68%, 60% 50%, 72% 56%, 84% 40%, 100% 48%,
    100% 100%, 0% 100%
  );
}

.line-c {
  background: linear-gradient(to right, rgba(45,212,191,0.08), rgba(45,212,191,0.9));
  clip-path: polygon(
    0% 84%, 10% 78%, 22% 82%, 34% 72%, 48% 78%, 62% 68%, 76% 72%, 88% 64%, 100% 68%,
    100% 100%, 0% 100%
  );
}

.dash-chart-glow {
  position: absolute;
  inset-inline: 0;
  bottom: -16%;
  height: 60%;
  background: radial-gradient(circle at top, rgba(56,189,248,0.38), transparent 70%);
}

/* signals list */

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.dash-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.sym { color:#e5e7eb; }

.sig-label {
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(148,163,184,0.6);
}

.sig-label.up { border-color: rgba(74,222,128,0.9); color:#bbf7d0; }
.sig-label.down { border-color: rgba(248,113,113,0.9); color:#fecaca; }
.sig-label.neutral { border-color: rgba(148,163,184,0.9); color:#e5e7eb; }

.sig-score {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

/* risk */

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  font-size: 0.8rem;
}

.risk-item {
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(30,64,175,0.8);
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,1));
}

.risk-item .label {
  display: block;
  margin-bottom: 0.2rem;
  color: #9ca3af;
}

.risk-item .value {
  font-variant-numeric: tabular-nums;
}

.risk-item .value.down { color:#fb7185; }

/* strategies table */

.strat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.strat-table th,
.strat-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
}

.strat-table thead {
  border-bottom: 1px solid rgba(30,64,175,0.9);
  color: #9ca3af;
}

.strat-table tbody tr:nth-child(odd) {
  background: rgba(15,23,42,0.9);
}

.strat-table td.up { color:#4ade80; }
.strat-table td.down { color:#fb7185; }

.badge {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid rgba(148,163,184,0.6);
}

.badge.up { border-color: rgba(74,222,128,0.9); color:#bbf7d0; }
.badge.down { border-color: rgba(248,113,113,0.9); color:#fecaca; }
.badge.neutral { border-color: rgba(148,163,184,0.9); color:#e5e7eb; }

/* responsive */

@media (max-width: 960px) {
  .dash-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .dash-sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .dash-sidebar-foot {
    display: none;
  }
}

@media (max-width: 800px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dash-card.span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .dash-main {
    padding: 1.2rem 1.1rem 1.4rem;
  }
  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* === Dashboard subtle motion === */
@keyframes dash-grid-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-20px); }
}
@keyframes dash-float-soft {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dash-chart {
  animation: dash-float-soft 680ms ease-out;
}
.dash-grid-bg {
  animation: dash-grid-drift 18s linear infinite alternate;
}
.dash-card {
  animation: dash-float-soft 720ms ease-out;
}
