@import "./member-center.css";

.field select,
.field input[type="number"],
.field textarea {
  width: 100%;
  border: 1px solid rgba(19, 33, 65, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #142038;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.5;
}

.chat-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.ai-chat-shell,
.ai-draft-panel {
  display: grid;
  gap: 14px;
}

.ai-chat-messages {
  display: grid;
  gap: 12px;
  min-height: 320px;
  max-height: 460px;
  padding: 18px;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(19, 33, 65, 0.08);
  background:
    radial-gradient(circle at top right, rgba(89, 170, 247, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(245, 249, 255, 0.92));
}

.ai-chat-bubble {
  max-width: min(88%, 560px);
  padding: 14px 16px;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(17, 31, 60, 0.08);
}

.ai-chat-bubble.assistant {
  justify-self: start;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(19, 33, 65, 0.08);
}

.ai-chat-bubble.user {
  justify-self: end;
  background: linear-gradient(135deg, rgba(89, 170, 247, 0.22), rgba(109, 93, 246, 0.18));
  border: 1px solid rgba(89, 170, 247, 0.18);
}

.ai-chat-role {
  display: block;
  margin-bottom: 8px;
  color: rgba(20, 32, 56, 0.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-chat-copy {
  color: #142038;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-chat-chip {
  border-radius: 999px;
}

.ai-chat-form {
  display: grid;
  gap: 12px;
}

.ai-chat-field {
  display: grid;
  gap: 8px;
}

.ai-chat-actions,
.ai-draft-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-chat-actions .inline-status {
  flex: 1 1 220px;
}

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

.ai-draft-card {
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(19, 33, 65, 0.08);
}

.ai-draft-card.is-missing {
  border-color: rgba(209, 61, 56, 0.18);
  background: rgba(255, 245, 244, 0.9);
}

.ai-draft-card strong {
  display: block;
  margin-bottom: 6px;
  color: #142038;
  font-size: 14px;
}

.ai-draft-card span {
  display: block;
  color: rgba(20, 32, 56, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.curve-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.curve-tab {
  border: 1px solid rgba(19, 33, 65, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #142038;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.curve-tab.active {
  background: linear-gradient(135deg, rgba(242, 200, 121, 0.24), rgba(89, 144, 255, 0.18));
  border-color: rgba(191, 149, 73, 0.55);
  transform: translateY(-1px);
}

.kline-chart {
  width: 100%;
  height: auto;
}

.kline-grid-line {
  stroke: rgba(20, 32, 56, 0.1);
  stroke-width: 1;
}

.kline-axis-line {
  stroke: rgba(20, 32, 56, 0.2);
  stroke-width: 1.2;
}

.kline-wick {
  stroke-width: 2;
  stroke-linecap: round;
}

.kline-wick.bull,
.kline-candle.bull {
  stroke: #2f8f6f;
  fill: rgba(47, 143, 111, 0.28);
}

.kline-wick.bear,
.kline-candle.bear {
  stroke: #bc5a48;
  fill: rgba(188, 90, 72, 0.24);
}

.kline-current-marker {
  stroke: rgba(242, 200, 121, 0.95);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}

.kline-axis-label,
.kline-bottom-label {
  fill: rgba(20, 32, 56, 0.7);
  font-size: 12px;
}

.kline-callout {
  fill: #1d2b49;
  font-size: 12px;
}

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

.bazi-pill {
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(19, 33, 65, 0.08);
}

.bazi-pill strong {
  display: block;
  color: #142038;
  font-size: 14px;
  margin-bottom: 6px;
}

.bazi-pill span {
  display: block;
  color: rgba(20, 32, 56, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.report-card .report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-card .report-actions .small-button[disabled] {
  opacity: 0.56;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .chat-entry-grid,
  .bazi-pill-grid {
    grid-template-columns: 1fr;
  }

  .ai-draft-grid {
    grid-template-columns: 1fr;
  }

  .curve-tabs {
    gap: 8px;
  }

  .curve-tab {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .ai-chat-messages {
    min-height: 260px;
  }
}
