/* === ADVISOR PAGE === */
.advisor-body {
  min-height: 100vh;
  background: var(--bg);
}

.advisor-main {
  padding: 100px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.advisor-header {
  margin-bottom: 48px;
}

.advisor-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.advisor-header p {
  font-size: 16px;
  color: var(--text-2);
}

.advisor-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* === ADVISOR CHAT === */
.advisor-chat {
  max-width: 780px;
}

.advisor-chat .chat-body {
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 320px;
  color: var(--text-3);
}

.chat-empty-icon {
  margin-bottom: 8px;
  opacity: 0.4;
}

.chat-empty p {
  font-size: 15px;
  color: var(--text-2);
}

.chat-empty-hint {
  font-size: 13px !important;
  color: var(--text-3) !important;
}

/* Messages */
.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: msg-in 0.3s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg + .chat-msg {
  margin-top: 16px;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
  margin-top: 2px;
}

.msg-avatar--ai {
  background: var(--accent-dim);
  border-color: rgba(0,212,164,0.2);
  color: var(--accent);
}

.msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  max-width: 560px;
  line-height: 1.5;
}

.msg-bubble--ai {
  background: var(--bg-2);
}

.msg-bubble--user {
  border-radius: 12px 12px 4px 12px;
}

/* Signal Block (inside AI response) */
.signal-block {
  margin: 0 0 12px;
}

.signal-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.signal-ticker {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.signal-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.signal-badge--bullish {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0,212,164,0.2);
}

.signal-badge--bearish {
  background: rgba(255,107,107,0.12);
  color: #FF6B6B;
  border: 1px solid rgba(255,107,107,0.2);
}

.signal-badge--neutral {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.signal-badge--watch {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(244,162,97,0.2);
}

/* Factor breakdown */
.factor-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.factor-card {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.factor-card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.factor-card-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.factor-card-value--good { color: var(--accent); }
.factor-card-value--bad  { color: #FF6B6B; }
.factor-card-value--mid  { color: var(--amber); }

/* Reasoning */
.signal-reasoning {
  margin-bottom: 14px;
}

.signal-reasoning-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.reason-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reason-item {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 2px solid var(--accent);
}

.reason-item--negative {
  border-left-color: #FF6B6B;
}

.reason-item--neutral {
  border-left-color: var(--amber);
}

.signal-risk {
  font-size: 12px;
  color: #FF6B6B;
  padding: 8px 12px;
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.15);
  border-radius: 8px;
  margin-top: 8px;
}

/* Confidence */
.signal-confidence {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.confidence-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.confidence-bar {
  flex: 1;
  height: 4px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.confidence-fill--high   { background: var(--accent); }
.confidence-fill--medium { background: var(--amber); }
.confidence-fill--low    { background: #FF6B6B; }

.confidence-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 36px;
  text-align: right;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 12px 16px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(1); opacity: 0.4; }
  40%           { transform: scale(1.3); opacity: 1; }
}

/* Input area */
.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color 0.2s;
}

.chat-input-wrap:focus-within {
  border-color: rgba(0,212,164,0.3);
}

#chatInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

#chatInput::placeholder {
  color: var(--text-3);
}

.send-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0C0F1E;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.15s;
}

.send-btn:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.97);
}

.quick-picks {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.quick-pick {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  letter-spacing: 0.03em;
}

.quick-pick:hover {
  border-color: rgba(0,212,164,0.4);
  color: var(--accent);
  background: var(--accent-dim);
}

/* === INFO PANEL === */
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.info-section h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.signal-guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.guide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.guide-dot--bullish {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.guide-dot--bearish {
  background: #FF6B6B;
  box-shadow: 0 0 6px #FF6B6B;
}

.guide-dot--neutral {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

.factor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.factor-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.factor-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.factor-item strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.factor-item p {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.disclaimer p {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .advisor-layout {
    grid-template-columns: 1fr;
  }

  .info-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .disclaimer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .advisor-main {
    padding: 90px 20px 40px;
  }

  .info-panel {
    grid-template-columns: 1fr;
  }

  .factor-breakdown {
    grid-template-columns: 1fr;
  }
}