/* Stock Predictor — AI assistant panel (Lumen). */
.as-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #8a5cff); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); }
.as-fab:hover { filter: brightness(1.08); }
.as-spark { font-size: 16px; line-height: 1; }
.as-panel { position: fixed; right: 20px; bottom: 20px; z-index: 46; width: min(440px, calc(100vw - 32px)); height: min(680px, calc(100vh - 100px)); display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); overflow: hidden; }
.as-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.as-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.as-title .as-spark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--accent), #8a5cff); }
.as-status { font-size: 11.5px; color: var(--muted); }
.as-status::before { content: "●"; margin-right: 5px; font-size: 9px; color: var(--muted); }
.as-status.on::before { color: var(--up); }
.as-status.off::before { color: var(--down); }
.as-status.wait::before { color: #fab219; }
.as-status.idle::before { color: var(--accent); }
.as-steps { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.as-steps summary { cursor: pointer; }
.as-steps ul { margin: 4px 0 0; padding-left: 18px; }
.as-new { padding: 4px 10px; font-size: 12px; }
.as-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.as-hello { color: var(--text-2); font-size: 13.5px; }
.as-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.as-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.as-msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.as-msg.error { border: 1px solid color-mix(in srgb, var(--down) 45%, transparent); }
.as-md > :first-child { margin-top: 0; }
.as-md > :last-child { margin-bottom: 0; }
.as-md p { margin: 0 0 8px; font-size: 13.5px; }
.as-md ul, .as-md ol { margin: 0 0 8px; padding-left: 20px; }
.as-md li { margin-bottom: 3px; }
.as-md h3, .as-md h4, .as-md h5, .as-md h6 { font-size: 14px; margin: 10px 0 4px; }
.as-md code { font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.as-md pre { background: var(--surface-3); padding: 8px 10px; border-radius: 8px; overflow-x: auto; }
.as-md pre code { background: none; padding: 0; }
.as-md a { color: var(--accent-ink); }
.as-tbl { overflow-x: auto; margin: 0 0 8px; }
.as-tbl table { border-collapse: collapse; font-size: 12.5px; }
.as-tbl th, .as-tbl td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.as-tbl th { color: var(--text-2); font-weight: 600; }
.as-meta { margin-top: 6px; font-size: 11px; color: var(--muted); }
.as-live { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; }
.small-spin { width: 14px; height: 14px; border-width: 2px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.as-chips .chip { text-align: left; padding: 5px 10px; }
.as-chips:empty { display: none; }
.as-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); }
.as-form textarea { flex: 1; resize: none; min-height: 38px; max-height: 140px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 13.5px; line-height: 1.4; }
.as-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.as-form .btn-primary { height: 38px; }
@media (max-width: 760px) {
  .as-fab { right: 14px; bottom: 14px; padding: 10px 14px; }
  .as-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}
