/* brain.css — AI Market Brain dashboard (Brain Sprint 5).
   Dark, minimal, terminal-native. Only brain-prefixed classes: nothing here
   can restyle an existing widget. Palette rides on the terminal theme tokens
   with local fallbacks for standalone rendering. */

.brain-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.brain-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

@media (max-width: 1100px) {
  .brain-layout { grid-template-columns: 1fr; }
}

/* Decision badge — the six-state ladder. */
.brain-dec {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.brain-dec.strongbuy { background: rgba(46,229,200,.28); border-color: #2EE5C8; color: #d9ffe9; }
.brain-dec.buy       { background: rgba(46,229,200,.16); border-color: rgba(46,229,200,.6); color: #a7f3cf; }
.brain-dec.watch     { background: rgba(240,185,11,.16); border-color: rgba(240,185,11,.6); color: #ffe9ad; }
.brain-dec.wait      { background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.45); color: #cbd5e1; }
.brain-dec.sell      { background: rgba(255,107,138,.16); border-color: rgba(255,107,138,.6); color: #ffc9cd; }
.brain-dec.strongsell{ background: rgba(255,107,138,.30); border-color: #FF6B8A; color: #ffe1e3; }

.brain-dec-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.brain-dec-sym { font-weight: 800; font-size: 15px; letter-spacing: 0.04em; }
.brain-sub { margin-top: 8px; font-size: 11px; opacity: 0.75; line-height: 1.5; }

/* Score / probability bars. */
.brain-bar {
  position: relative;
  flex: 1;
  height: 14px;
  min-width: 120px;
  background: rgba(148,163,184,.12);
  border-radius: 3px;
  overflow: hidden;
}
.brain-bar__fill { height: 100%; border-radius: 3px; background: #5b8def; transition: width .4s ease; }
.brain-bar__fill.score { background: linear-gradient(90deg,#5b8def,#2EE5C8); }
.brain-bar__fill.conf  { background: linear-gradient(90deg,#7c6cf0,#5b8def); }
.brain-bar__fill.qual  { background: linear-gradient(90deg,#f0b90b,#2EE5C8); }
.brain-bar__fill.pos   { background: #2EE5C8; }
.brain-bar__fill.neg   { background: #FF6B8A; }
.brain-bar__label {
  position: absolute; right: 6px; top: 0;
  font-size: 10px; line-height: 14px; font-weight: 700; opacity: .9;
}

/* Section headers inside cards. */
.brain-h { font-size: 10px; font-weight: 800; letter-spacing: .1em; opacity: .7; margin: 8px 0 4px; }
.brain-h.risk { color: #ffb3b8; opacity: .95; }

.brain-list { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.65; }
.brain-list.risk li { color: #ffc9cd; }

/* Warning chips. */
.brain-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.brain-chip {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  padding: 2px 8px; border-radius: 999px; border: 1px solid;
}
.brain-chip.info     { border-color: rgba(148,163,184,.5);  color: #cbd5e1; }
.brain-chip.caution  { border-color: rgba(240,185,11,.6);   color: #ffe9ad; }
.brain-chip.critical { border-color: #FF6B8A;               color: #ffc9cd; }

/* Timeline. */
.brain-timeline { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.brain-tl {
  display: grid; grid-template-columns: 42px 92px 1fr; gap: 8px;
  font-size: 11.5px; padding: 3px 6px; border-radius: 3px; align-items: baseline;
}
.brain-tl:nth-child(odd) { background: rgba(148,163,184,.06); }
.brain-tl__ts { font-family: "JetBrains Mono", monospace; opacity: .7; }
.brain-tl__sym { font-weight: 700; }
.brain-tl.decision   .brain-tl__txt { color: #a7f3cf; }
.brain-tl.confidence .brain-tl__txt { color: #b9c8ff; }
.brain-tl.target_hit .brain-tl__txt { color: #2EE5C8; font-weight: 700; }
.brain-tl.stop_risk  .brain-tl__txt { color: #FF6B8A; font-weight: 700; }
.brain-tl.warning    .brain-tl__txt { color: #ffe9ad; }

/* Grid interactions + empty states. */
.brain-rowlink { cursor: pointer; }
.brain-rowlink:hover td { background: rgba(91,141,239,.10); }
.brain-empty { font-size: 12px; opacity: .6; padding: 6px 0; }
.brain-empty.ok { color: #a7f3cf; opacity: .85; }
.brain-grid td, .brain-grid th { white-space: nowrap; }
