/* ============================================================
   MERIDIAN — View-specific styles · Atmosphere edition
   ============================================================ */

/* ============ Dashboard ============ */

.dash-hero-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: var(--gap);
  align-items: stretch;
}

.hero-panel { padding: 24px 24px 10px; overflow: visible; }

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hero-equity {
  font-size: 56px;
  margin-top: 10px;
  color: var(--text-hi);
  letter-spacing: -0.045em;
}

.hero-equity::after { content: ''; }

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--r-full);
  border: 1px solid var(--stroke);
  background: var(--glass-hi);
}

.hero-chart { margin: 6px -6px 0; }

.kpi-row {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  padding: 15px 4px;
  border-top: 1px solid var(--stroke);
  flex-wrap: wrap;
}

.kpi-val { font-size: 19px; font-weight: 600; }
.kpi-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-top: 3px; }

.session-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 4px;
}

.sess-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}

.sess-dot.live {
  background: var(--profit);
  box-shadow: 0 0 10px var(--profit);
  animation: pulseDot 2s infinite;
}

.desk-clock { font-size: 15px; color: var(--text-hi); letter-spacing: 0.04em; font-weight: 500; }

.countdown {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-hi);
  margin-top: 12px;
  letter-spacing: 0.01em;
}

.heat-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.heat-key.pos { background: rgba(var(--m-profit-rgb), 0.75); }
.heat-key.neg { background: rgba(var(--m-loss-rgb), 0.75); }

.trade-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}
.trade-row:hover { background: var(--glass-soft); }

.watch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.watch-row:hover { background: var(--glass-soft); }
.watch-spark { opacity: 0.85; }

/* ============ Chart primitives ============ */

.heatcal { display: flex; gap: 8px; }

.heatcal-days {
  display: grid;
  grid-template-rows: repeat(5, 15px);
  gap: 4px;
  align-items: center;
}
.heatcal-days span { font-size: 9px; color: var(--text-faint); line-height: 1; }

.heatcal-grid { display: flex; gap: 4px; flex: 1; }
.heatcal-col { display: grid; grid-template-rows: repeat(5, 15px); gap: 4px; flex: 1; }

.heatcell {
  display: block;
  border-radius: 4px;
  background: var(--track);
  border: 1px solid transparent;
  cursor: pointer;
  min-width: 13px;
  transition: transform 150ms var(--e-spring);
}
.heatcell:hover { transform: scale(1.25); }
.heatcell.future { opacity: 0.3; cursor: default; }
.heatcell.today { outline: 1.5px solid var(--accent); outline-offset: 1px; }

.hbars { display: flex; flex-direction: column; gap: 9px; }

.hbar-row {
  display: grid;
  grid-template-columns: 132px 1fr 86px;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
}

.hbar-label { display: flex; flex-direction: column; min-width: 0; }
.hbar-label span:first-child { font-size: 12.5px; font-weight: 620; }
.hbar-sub { font-size: 10.5px; color: var(--text-dim); font-family: var(--f-mono); }

.hbar-track {
  height: 10px;
  border-radius: var(--r-full);
  background: var(--track);
  overflow: hidden;
}
.hbar-track i { display: block; height: 100%; border-radius: var(--r-full); }

.hbar-val { font-size: 12px; text-align: right; font-weight: 600; }

/* ============ Analytics ============ */

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.insight {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--glass-hi);
  border: 1px solid var(--stroke);
  align-items: flex-start;
}

.insight p { font-size: 12.5px; line-height: 1.6; color: var(--text-mid); }
.insight-ic { flex-shrink: 0; margin-top: 1px; }
.insight-ic svg { width: 16px; height: 16px; }
.insight.pos .insight-ic { color: var(--profit); }
.insight.neg .insight-ic { color: var(--loss); }
.insight.info .insight-ic { color: var(--info); }

/* ============ Risk ============ */

.calc-out {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--glass-hi);
  border: 1px solid var(--stroke-accent);
}

.calc-out .display { color: var(--text-hi); margin-top: 4px; }

/* ============ Playbook ============ */

.setup-ic {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: var(--accent-ink);
  box-shadow: var(--glow-accent);
  flex-shrink: 0;
}
.setup-ic svg { width: 19px; height: 19px; }

.rule-list { display: flex; flex-direction: column; gap: 7px; }

.rule-list li {
  display: flex;
  gap: 11px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.55;
  align-items: baseline;
}

.rule-n {
  color: var(--text-dim);
  font-size: 10.5px;
  flex-shrink: 0;
  font-weight: 600;
}

.setup-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--stroke);
}

.preflight-verdict {
  text-align: center;
  padding: 16px 0 4px;
  border-top: 1px solid var(--stroke);
}

/* ============ Signals ============ */

.sig-levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.sig-level {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  background: var(--glass-hi);
  border: 1px solid var(--stroke);
}

/* ============ Academy ============ */

.module {
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--glass-hi);
  overflow: hidden;
}

.module summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 13px;
  list-style: none;
  transition: background var(--t-fast);
  user-select: none;
}

.module summary::-webkit-details-marker { display: none; }
.module summary:hover { background: var(--glass-soft); }
.module[open] summary { border-bottom: 1px solid var(--stroke); }

.mod-n {
  font-size: 10.5px;
  color: var(--text-dim);
  width: 22px;
  flex-shrink: 0;
  font-weight: 600;
}

.lessons { padding: 6px 8px; }

/* ============ Calendar ============ */

.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.event-row:hover { background: var(--glass-soft); }
.event-row.past { opacity: 0.45; }
.event-row .btn-icon { opacity: 0; transition: opacity var(--t-fast); }
.event-row:hover .btn-icon { opacity: 1; }

/* ============ Settings ============ */

.accent-swatch {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  background: var(--glass-hi);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-med);
}

.accent-swatch i {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: var(--sw);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--sw) 45%, transparent);
}

.accent-swatch:hover { transform: scale(1.08); }
.accent-swatch.on { border-color: var(--sw); box-shadow: var(--shadow-1); }

.data-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: var(--glass-hi);
}

.data-row.danger { border-color: var(--loss-stroke); }

/* ============ Responsive ============ */

@media (max-width: 1100px) {
  .dash-hero-grid { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .hero-equity { font-size: 44px; }
}

@media (max-width: 860px) {
  .sig-levels { grid-template-columns: repeat(2, 1fr); }
  .setup-stats { grid-template-columns: repeat(2, 1fr); }
  .hbar-row { grid-template-columns: 100px 1fr 76px; }
  .kpi-row { gap: 16px; }
}
