:root {
  --bm-bg: #f5efe6;
  --bm-panel: rgba(255, 251, 245, 0.94);
  --bm-panel-border: rgba(102, 71, 42, 0.12);
  --bm-text: #1f1a17;
  --bm-muted: #6f6257;
  --bm-accent: #e08b20;
  --bm-accent-strong: #b36206;
  --bm-purple: #8a4dff;
  --bm-red: #df4b43;
  --bm-blue: #9ad8ff;
  --bm-success: #1b8049;
  --bm-black: #111111;
  --bm-shadow: 0 28px 60px rgba(102, 71, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--bm-text);
  background:
    radial-gradient(circle at top left, rgba(224, 139, 32, 0.2), transparent 26%),
    radial-gradient(circle at right center, rgba(138, 77, 255, 0.11), transparent 24%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bm-bg) 100%);
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

.bm-app button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  padding: 0.92rem 1.12rem;
  background: linear-gradient(135deg, var(--bm-accent), var(--bm-accent-strong));
  color: #fff;
  font-weight: 700;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.bm-app button:hover {
  transform: translateY(-1px);
}

.bm-app button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.bm-app {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.bm-page-stack {
  display: grid;
  gap: 1.25rem;
}

.bm-hero {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1.5rem;
  padding: 1rem 0 2rem;
}

.bm-hero-side {
  display: grid;
  gap: 1rem;
  min-width: min(100%, 420px);
}

.bm-eyebrow,
.bm-helper,
.bm-meta,
.bm-stat span,
.bm-empty {
  color: var(--bm-muted);
}

.bm-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
}

.bm-hero h1 {
  margin: 0.25rem 0 0.65rem;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.bm-hero-text {
  margin: 0;
  max-width: 62ch;
  color: var(--bm-muted);
  font-size: 1.05rem;
}

.bm-hero-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.bm-top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  align-items: center;
}

.bm-stat,
.bm-panel,
.bm-timeline-item,
.bm-trend-card {
  background: var(--bm-panel);
  border: 1px solid var(--bm-panel-border);
  box-shadow: var(--bm-shadow);
  backdrop-filter: blur(16px);
}

.bm-stat {
  border-radius: 22px;
  padding: 1rem 1.1rem;
}

.bm-stat strong {
  display: block;
  margin-top: 0.35rem;
}

.bm-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.7fr);
  gap: 1.25rem;
  align-items: start;
}

.bm-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.bm-main-column,
.bm-side-column,
.bm-stack,
.bm-timeline {
  display: grid;
  gap: 1rem;
}

.bm-side-column {
  align-content: start;
}

.bm-panel {
  border-radius: 28px;
  padding: 1.2rem;
}

.bm-chart-panel {
  padding-bottom: 1rem;
}

.bm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bm-section-header h2,
.bm-subheading {
  margin: 0;
}

.bm-pill {
  display: inline-flex;
  align-self: start;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(224, 139, 32, 0.14);
  color: var(--bm-accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.bm-chart-shell {
  position: relative;
  width: 100%;
  height: clamp(460px, 68vh, 780px);
  border-radius: 22px;
  overflow: hidden;
  background: #000;
}

.bm-chart {
  width: 100%;
  height: 100%;
}

.bm-chart > div,
.bm-chart iframe,
.bm-chart .tradingview-widget-container,
.bm-chart .tradingview-widget-container__widget {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
}

.bm-trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.bm-trend-card {
  border-radius: 22px;
  padding: 1rem;
}

.bm-trend-card strong {
  display: block;
  margin: 0.3rem 0 0.4rem;
  font-size: 1.2rem;
}

.bm-trend-label {
  display: inline-flex;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(31, 26, 23, 0.06);
  font-size: 0.8rem;
  font-weight: 700;
}

.bm-trend-bullish {
  color: var(--bm-success);
}

.bm-trend-bearish {
  color: var(--bm-red);
}

.bm-timeline-item {
  border-radius: 18px;
  padding: 0.95rem 1rem;
  border-left: 6px solid transparent;
}

.bm-timeline-item.event {
  border-left-color: var(--bm-black);
}

.bm-timeline-item.confirmation-ma20 {
  border-left-color: var(--bm-purple);
}

.bm-timeline-item.confirmation-ma200 {
  border-left-color: var(--bm-red);
}

.bm-timeline-item strong,
.bm-timeline-item span {
  display: block;
}

.bm-timeline-item span + span {
  margin-top: 0.24rem;
}

.bm-secondary-button {
  background: rgba(31, 26, 23, 0.08) !important;
  color: var(--bm-text) !important;
}

.bm-gauge-card {
  display: grid;
  gap: 1rem;
}

.bm-gauge {
  width: 100%;
  min-height: 280px;
}

.bm-gauge svg {
  width: 100%;
  height: auto;
  display: block;
}

.bm-gauge-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.bm-gauge-metrics div {
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  background: rgba(31, 26, 23, 0.05);
}

.bm-gauge-metrics span {
  display: block;
  color: var(--bm-muted);
  font-size: 0.85rem;
}

.bm-gauge-metrics strong {
  display: block;
  margin-top: 0.28rem;
}

.bm-gauge-zone-label {
  font-size: 12px;
  fill: var(--bm-muted);
}

.bm-gauge-zone-label.orange {
  fill: #f08d2b;
}

@media (max-width: 1080px) {
  .bm-hero,
  .bm-top-grid,
  .bm-bottom-row,
  .bm-trend-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .bm-top-actions {
    justify-content: start;
  }

  .bm-gauge-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .bm-app {
    width: min(100% - 1rem, 1400px);
  }

  .bm-panel,
  .bm-stat {
    border-radius: 22px;
  }

  .bm-chart-shell,
  .bm-chart {
    height: clamp(420px, 62vh, 620px);
  }

  .bm-gauge {
    min-height: 240px;
  }
}
