:root {
  --bg: #09111f;
  --bg-soft: #101a2c;
  --panel: rgba(10, 18, 32, 0.82);
  --panel-border: rgba(163, 188, 255, 0.16);
  --text: #eef4ff;
  --muted: #91a0bd;
  --accent: #3dd9b1;
  --accent-2: #61a8ff;
  --danger: #ff6b7a;
  --warning: #ffbf69;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(61, 217, 177, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(97, 168, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #07101c 0%, #0c1322 52%, #101828 100%);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.95;
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.symbol-picker,
.risk-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.symbol-picker span,
.risk-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

select,
input {
  min-width: 160px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.action-button {
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111f;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 22px;
}

.pulse-panel,
.routine-panel {
  grid-column: span 12;
}

.chart-panel {
  grid-column: span 7;
}

.watchlist-panel {
  grid-column: span 5;
}

.movers-panel,
.risk-panel {
  grid-column: span 6;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.stat-card,
.risk-results article,
.mover-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card span,
.risk-results span,
.mover-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-card strong,
.risk-results strong,
.mover-card strong {
  display: block;
  font-size: 1.5rem;
}

.stat-card small,
.mover-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.fear-card {
  background: linear-gradient(135deg, rgba(255, 191, 105, 0.15), rgba(255, 107, 122, 0.12));
}

.chart-wrap {
  height: clamp(420px, 62vh, 760px);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.chart-frame {
  display: block;
  width: 100%;
  height: clamp(420px, 62vh, 760px);
  border: 0;
  background: transparent;
}

.watchlist-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.watchlist-toolbar input {
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

td {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.positive {
  color: #8cffc7;
  background: rgba(61, 217, 177, 0.13);
}

.negative {
  color: #ff9aa5;
  background: rgba(255, 107, 122, 0.13);
}

.neutral {
  color: #d7def2;
  background: rgba(255, 255, 255, 0.09);
}

.remove-button {
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

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

.mover-card strong {
  margin-bottom: 6px;
}

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

.risk-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

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

.routine-columns h3 {
  margin-top: 0;
}

.checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-note {
  padding: 14px 4px 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .chart-panel,
  .watchlist-panel,
  .movers-panel,
  .risk-panel {
    grid-column: span 12;
  }

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

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    padding-top: 16px;
  }

  .hero,
  .hero-actions,
  .watchlist-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .risk-grid,
  .risk-results,
  .routine-columns,
  .movers-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .hero h1 {
    max-width: 100%;
  }
}
