:root {
  color-scheme: dark;
  --bg: #101313;
  --panel: #191d1b;
  --panel-strong: #202620;
  --line: #334038;
  --text: #f2f4ef;
  --muted: #aeb8ad;
  --green: #58d68d;
  --red: #ff6b6b;
  --amber: #f4c95d;
  --cyan: #5cc8ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(88, 214, 141, 0.12), transparent 30%),
    linear-gradient(315deg, rgba(244, 201, 93, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4ef;
  color: #111411;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 16px;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.45rem;
}

.session {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 27, 0.85);
  padding: 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(88, 214, 141, 0.14);
}

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

.market-strip article,
.chart-panel,
.side-panel article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 27, 0.92);
}

.market-strip article {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 16px;
}

.market-strip span,
.signal-card span,
.metric-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.market-strip strong {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.market-strip em {
  font-style: normal;
  font-weight: 800;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  align-items: stretch;
}

.chart-panel {
  min-height: 560px;
  padding: 18px;
}

canvas {
  display: block;
  width: 100%;
  height: min(420px, 56vh);
  margin-top: 18px;
  border: 1px solid rgba(92, 200, 255, 0.24);
  border-radius: 8px;
  background: #111614;
}

.side-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
}

.signal-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.signal-card strong {
  color: var(--green);
  font-size: 1.65rem;
  line-height: 1.05;
}

.signal-card p {
  color: var(--muted);
  line-height: 1.6;
}

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

.metric-grid div {
  display: grid;
  gap: 8px;
  min-height: 112px;
  background: var(--panel-strong);
  padding: 16px;
}

.metric-grid strong {
  font-size: 1.25rem;
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 20px, 680px);
    padding: 18px 0;
  }

  .topbar {
    align-items: flex-start;
  }

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

  .chart-panel {
    min-height: auto;
    padding: 14px;
  }

  .market-strip article {
    min-height: 86px;
  }
}

@media (max-width: 520px) {
  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  .session {
    width: 100%;
    justify-content: center;
  }
}
