/*
 * AI 助手升级 — 高保真原型
 * 变量与尺寸取自线上组件：AiAssistantPanel.vue / AiMessageItem.vue / AiWelcome.vue
 * / AiSender.vue / AiThinkingSteps.vue
 */

/* ───────── 主题变量（与 AiAssistantPanel.vue 一致） ───────── */

.panel {
  --ai-bg: #fff;
  --ai-bg-secondary: #f8f8f8;
  --ai-bg-hover: #f5f5f5;
  --ai-bg-skeleton: #f0f0f0;
  --ai-border: #e9eaea;
  --ai-border-light: #f0f0f0;
  --ai-shadow: rgba(0, 0, 0, 0.08);
  --ai-text-primary: #222426;
  --ai-text-secondary: #333;
  --ai-text-tertiary: #6c6f71;
  --ai-text-muted: #9b9e9f;
  --ai-text-placeholder: #b3b5b6;
  --ai-icon-color: #666;
  --ai-icon-hover-color: #333;
  --ai-icon-invert: 0;
  --ai-user-bubble-bg: #fff8e8;
  --ai-user-bubble-color: #333;
  --ai-sender-bg: linear-gradient(180deg, rgba(250, 250, 250, 0.8) 0%, #ffffff 100%);
  --ai-input-bg: #fff;
  --ai-input-border: #e9eaea;
  --ai-source-card-bg: #f8f8f8;
  --ai-source-card-hover: #f3f3f3;
  --ai-link-color: #dca164;
  --ai-citation-bg: #fff8e8;
  --ai-citation-hover-bg: #ffefd6;
  --ai-prompt-bg: #f9fafc;
  --ai-prompt-border: #e9eaea;
  --ai-prompt-hover-bg: #fef9f4;
  --ai-scrollbar-thumb: #d0d0d0;
  --ai-scrollbar-thumb-hover: #bbb;
  --ai-brand: #dca164;
  --ai-brand-strong: #ee8e25;
  --ai-danger: #eb655e;
  --ai-danger-bg: #ffeeee;
  --ai-success: #43c363;
  --ai-success-bg: #e8ffea;
}

.panel--dark {
  --ai-bg: #1a1a1a;
  --ai-bg-secondary: #222;
  --ai-bg-hover: #2a2a2a;
  --ai-bg-skeleton: #2a2a2a;
  --ai-border: #333;
  --ai-border-light: #333;
  --ai-shadow: rgba(0, 0, 0, 0.3);
  --ai-text-primary: #e5e5e5;
  --ai-text-secondary: #ccc;
  --ai-text-tertiary: #999;
  --ai-text-muted: #777;
  --ai-text-placeholder: #666;
  --ai-icon-color: #aaa;
  --ai-icon-hover-color: #e5e5e5;
  --ai-icon-invert: 1;
  --ai-user-bubble-bg: rgba(225, 134, 26, 0.8);
  --ai-user-bubble-color: #fff;
  --ai-sender-bg: linear-gradient(180deg, rgba(26, 26, 26, 0.8) 0%, #1a1a1a 100%);
  --ai-input-bg: #222;
  --ai-input-border: #444;
  --ai-source-card-bg: #222;
  --ai-source-card-hover: #2a2a2a;
  --ai-link-color: #e8a94f;
  --ai-citation-bg: #2a2210;
  --ai-citation-hover-bg: #3a3015;
  --ai-prompt-bg: #222;
  --ai-prompt-border: #333;
  --ai-prompt-hover-bg: #2a2210;
  --ai-scrollbar-thumb: #444;
  --ai-scrollbar-thumb-hover: #555;
  --ai-danger-bg: #3a1f1e;
  --ai-success-bg: #1c2e1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #222426;
  background: #f4f5f7;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

/* ───────── 原型外壳 ───────── */

.shell {
  display: flex;
  min-height: 100vh;
}

.shell__side {
  width: 236px;
  flex-shrink: 0;
  background: #14171a;
  color: #c9d1d9;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.shell__brand {
  padding: 0 20px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid #262b31;
  margin-bottom: 12px;
}

.shell__brand small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 12px;
  color: #8b949e;
}

.shell__group {
  padding: 10px 20px 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e7681;
}

.shell__side a {
  display: block;
  padding: 7px 20px;
  color: #c9d1d9;
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
}

.shell__side a:hover {
  background: #1c2127;
  color: #fff;
}

.shell__side a[aria-current="page"] {
  background: #1c2127;
  color: #fff;
  border-left-color: var(--ai-brand, #dca164);
}

.shell__main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 48px;
}

.page-head {
  max-width: 1100px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.page-head p {
  margin: 0 0 10px;
  color: #5b6166;
  max-width: 820px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  background: #e8eef4;
  color: #44607a;
}

.tag--live {
  background: #e8ffea;
  color: #2b8a46;
}

/* 控制条 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.toolbar__label {
  font-size: 12px;
  color: #6e767d;
  margin-right: 2px;
}

.seg {
  display: inline-flex;
  border: 1px solid #e3e6e8;
  border-radius: 8px;
  overflow: hidden;
}

.seg button {
  padding: 6px 12px;
  border: none;
  background: #fff;
  color: #5b6166;
  font-size: 13px;
  cursor: pointer;
}

.seg button + button {
  border-left: 1px solid #e3e6e8;
}

.seg button:hover {
  background: #f6f7f8;
}

.seg button[aria-pressed="true"] {
  background: var(--ai-brand, #dca164);
  color: #fff;
}

/* 舞台 */
.stage {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.stage__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
}

.stage__title {
  font-size: 14px;
  font-weight: 600;
}

.stage__desc {
  font-size: 13px;
  color: #6e767d;
}

.note {
  padding: 8px 12px;
  border-left: 3px solid #0792fb;
  border-radius: 0 6px 6px 0;
  background: #eef7ff;
  color: #1c5c8c;
  font-size: 12px;
  line-height: 1.6;
}

.note code {
  background: rgba(7, 146, 251, 0.12);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 11px;
}

.note--warn {
  border-left-color: #e8a13c;
  background: #fff8ec;
  color: #8a5a16;
}

.note--warn code {
  background: rgba(232, 161, 60, 0.16);
}

/* ───────── 面板（还原线上） ───────── */

.panel {
  width: 420px;
  height: 760px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ai-bg);
  border-left: 1px solid rgba(220, 161, 100, 0.15);
  box-shadow: -4px 0 24px var(--ai-shadow);
  border-radius: 10px;
  color: var(--ai-text-primary);
}

.panel--phone {
  width: 390px;
  height: 740px;
  border-radius: 34px;
  border: 10px solid #15181b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.panel--fit {
  height: auto;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  min-height: 44px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

.panel__header-left,
.panel__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hbtn {
  padding: 8px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ai-icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.hbtn:hover {
  background: var(--ai-bg-hover);
  color: var(--ai-icon-hover-color);
}

.hbtn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.hbtn svg path,
.hbtn svg circle {
  stroke: currentColor;
}

.ctx {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--ai-bg-secondary);
  color: var(--ai-text-tertiary);
  white-space: nowrap;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--ai-scrollbar-thumb) transparent;
}

.panel__body::-webkit-scrollbar {
  width: 6px;
}

.panel__body::-webkit-scrollbar-thumb {
  background: var(--ai-scrollbar-thumb);
  border-radius: 3px;
}

.panel__body::-webkit-scrollbar-thumb:hover {
  background: var(--ai-scrollbar-thumb-hover);
}

/* ───────── 消息 ───────── */

.msg {
  margin-bottom: 16px;
}

.msg--user {
  display: flex;
  justify-content: flex-end;
}

.bubble {
  max-width: calc(100% - 44px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ai-user-bubble-bg);
  color: var(--ai-user-bubble-color);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.025em;
  word-break: break-word;
}

.msg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.msg__head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 20px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fce6bf 5%, #ee8e25 100%);
  flex-shrink: 0;
}

.msg__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ai-text-primary);
}

.responded {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  line-height: 16px;
  color: var(--ai-text-tertiary);
}

.responded svg {
  transition: transform 0.2s;
}

.responded[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.text {
  font-size: 14px;
  line-height: 20px;
  color: var(--ai-text-primary);
}

.text p {
  margin: 0 0 10px;
}

.text p:last-child {
  margin-bottom: 0;
}

.text ul,
.text ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.text li {
  margin-bottom: 3px;
}

.text strong {
  font-weight: 600;
}

.cite {
  display: inline-block;
  min-width: 16px;
  padding: 0 5px;
  margin-left: 3px;
  border-radius: 4px;
  background: var(--ai-citation-bg);
  color: #a86a2c;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
  vertical-align: 1px;
  cursor: pointer;
}

.cite:hover {
  background: var(--ai-citation-hover-bg);
}

/* 思考步骤 */
.think {
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ai-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.think__step {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.think__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.think__icon {
  width: 16px;
  height: 16px;
}

.think__icon--spin {
  animation: spin 1s linear infinite;
}

.think__line {
  width: 1px;
  height: 8px;
  background: var(--ai-border);
}

.think__msg {
  font-size: 12px;
  line-height: 16px;
  color: var(--ai-text-tertiary);
  padding-top: 1px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 加载态 */
.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(220, 161, 100, 0.1);
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(220, 161, 100, 0.04) 0%,
    rgba(220, 161, 100, 0.08) 50%,
    rgba(220, 161, 100, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  font-size: 14px;
  line-height: 20px;
  color: var(--ai-text-tertiary);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 流式光标 */
.caret {
  display: inline-block;
  width: 2px;
  height: 14px;
  margin-left: 2px;
  background: var(--ai-brand);
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* 来源卡片 */
.source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--ai-border);
  border-radius: 8px;
  background: var(--ai-source-card-bg);
  cursor: pointer;
  transition: all 0.15s;
}

.source:hover {
  background: var(--ai-source-card-hover);
}

.source:hover .source__name {
  color: var(--ai-brand-strong);
  text-decoration: underline;
}

.source__name {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ai-text-secondary);
  letter-spacing: -0.035em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 操作条 */
.acts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.act {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ai-text-muted);
  transition: all 0.15s;
}

.act:hover:not(:disabled) {
  background: var(--ai-bg-hover);
}

.act:disabled {
  opacity: 0.4;
  cursor: default;
}

.act svg {
  width: 16px;
  height: 16px;
}

.act[aria-pressed="true"].act--up {
  background: var(--ai-success-bg);
  color: var(--ai-success);
}

.act[aria-pressed="true"].act--down {
  background: var(--ai-danger-bg);
  color: var(--ai-danger);
}

/* ───────── 首屏 ───────── */

.welcome__msg {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ai-text-secondary);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.welcome__msg p {
  margin: 0 0 8px;
}

.caps {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.caps li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ai-text-secondary);
}

.caps li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ai-brand);
}

.sub-label {
  margin: 14px 0 8px;
  font-size: 12px;
  color: var(--ai-text-tertiary);
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role {
  padding: 6px 13px;
  border: 1px solid var(--ai-prompt-border);
  border-radius: 16px;
  background: var(--ai-bg);
  color: var(--ai-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.role:hover {
  border-color: var(--ai-brand);
}

.role[aria-pressed="true"] {
  border-color: var(--ai-brand);
  background: var(--ai-prompt-hover-bg);
  color: #a86a2c;
  font-weight: 600;
}

.role--skip {
  border-style: dashed;
  color: var(--ai-text-muted);
}

.prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompt {
  width: 100%;
  text-align: left;
  border: 1px solid var(--ai-prompt-border);
  border-left: 3px solid var(--ai-brand);
  border-radius: 8px;
  padding: 12px 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ai-text-secondary);
  background: var(--ai-prompt-bg);
  letter-spacing: -0.025em;
  cursor: pointer;
  transition: all 0.15s;
}

.prompt:hover {
  background: var(--ai-prompt-hover-bg);
  border-color: var(--ai-brand);
  border-left-color: var(--ai-brand);
}

.promise {
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ai-success-bg);
  color: #2b8a46;
  font-size: 13px;
}

.panel--dark .promise {
  color: #6fd98a;
}

.terms {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ai-text-muted);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.terms:hover {
  color: var(--ai-brand);
}

/* ───────── 业务卡片 ───────── */

.card {
  margin-top: 12px;
  border: 1px solid var(--ai-border);
  border-radius: 8px;
  background: var(--ai-source-card-bg);
  overflow: hidden;
}

.card__tag {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-bottom: 1px solid var(--ai-border);
  background: rgba(7, 146, 251, 0.07);
  color: #1c5c8c;
  font-size: 11px;
  font-family: Consolas, Menlo, monospace;
}

body.show-tags .card__tag {
  display: flex;
}

.card__sec {
  padding: 12px 14px;
}

.card__sec + .card__sec {
  border-top: 1px solid var(--ai-border);
}

.card__label {
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ai-text-tertiary);
}

.card__big {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ai-text-primary);
}

.card__sub {
  font-size: 14px;
  color: var(--ai-text-secondary);
}

.card__note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ai-text-muted);
}

.card__title {
  font-size: 15px;
  font-weight: 600;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  color: var(--ai-text-secondary);
}

.rows li + li {
  border-top: 1px dashed var(--ai-border);
}

.rows s {
  color: var(--ai-text-muted);
}

.pill {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9px;
  white-space: nowrap;
  background: #fff1dc;
  color: #a86a2c;
}

.panel--dark .pill {
  background: #3a3015;
  color: #e8a94f;
}

.pill--add {
  background: var(--ai-success-bg);
  color: #2b8a46;
}

.pill--del {
  background: var(--ai-danger-bg);
  color: var(--ai-danger);
}

.binding {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 6px;
  background: var(--ai-citation-bg);
  color: #7a4d1d;
  font-size: 13px;
  line-height: 1.5;
}

.panel--dark .binding {
  color: #e8a94f;
}

.binding b {
  display: block;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.compare__arrow {
  color: var(--ai-text-muted);
}

.compare__old {
  color: var(--ai-text-muted);
  text-decoration: line-through;
  font-size: 13px;
}

.compare__new {
  font-weight: 700;
  color: var(--ai-text-primary);
  font-size: 15px;
}

.item {
  padding: 9px 0;
}

.item + .item {
  border-top: 1px dashed var(--ai-border);
}

.item__name {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ai-text-primary);
}

.item__why {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ai-text-tertiary);
}

.item__doc {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--ai-link-color);
  text-decoration: none;
}

.item__doc:hover {
  text-decoration: underline;
}

/* 按钮 */
.btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btns--row {
  flex-direction: row;
}

.btns--row .btn {
  flex: 1;
  text-align: center;
}

.btn {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--ai-border);
  border-radius: 6px;
  background: var(--ai-bg);
  color: var(--ai-text-secondary);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--ai-brand);
  color: var(--ai-brand-strong);
}

.btn--primary {
  border-color: var(--ai-brand);
  background: var(--ai-brand);
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.btn--primary:hover:not(:disabled) {
  background: var(--ai-brand-strong);
  border-color: var(--ai-brand-strong);
  color: #fff;
}

.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ai-text-muted);
  text-align: center;
}

.btn--ghost:hover:not(:disabled) {
  color: var(--ai-text-secondary);
  border-color: transparent;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn__spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

/* 选项（快捷回复） */
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.opt {
  padding: 5px 12px;
  border: 1px solid var(--ai-border);
  border-radius: 14px;
  background: var(--ai-bg);
  color: var(--ai-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.opt:hover {
  border-color: var(--ai-brand);
  background: var(--ai-prompt-hover-bg);
  color: #a86a2c;
}

/* 表单 */
.f {
  margin-bottom: 10px;
}

.f label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ai-text-tertiary);
}

.f input,
.f textarea,
.f select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ai-border);
  border-radius: 6px;
  background: var(--ai-input-bg);
  color: var(--ai-text-primary);
  font: inherit;
  font-size: 13px;
}

.f textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.6;
}

.f input:focus,
.f textarea:focus,
.f select:focus {
  outline: none;
  border-color: var(--ai-brand);
}

.f__hint {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ai-text-muted);
}

.f--row {
  display: flex;
  gap: 10px;
}

.f--row > .f {
  flex: 1;
}

.captcha {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--ai-border);
  border-radius: 4px;
  background: var(--ai-bg);
  font-size: 12px;
  color: var(--ai-text-tertiary);
  margin-bottom: 10px;
}

.captcha input {
  margin: 0;
}

.cb {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ai-text-secondary);
  cursor: pointer;
}

.cb input {
  margin-top: 3px;
  flex-shrink: 0;
}

.req {
  color: var(--ai-danger);
}

/* 提示条 */
.banner {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.banner--danger {
  background: var(--ai-danger-bg);
  color: #b83a33;
  font-weight: 600;
}

.panel--dark .banner--danger {
  color: #ff9a94;
}

.banner--ok {
  background: var(--ai-success-bg);
  color: #2b8a46;
}

.panel--dark .banner--ok {
  color: #6fd98a;
}

.banner--info {
  background: var(--ai-citation-bg);
  color: #7a4d1d;
}

.panel--dark .banner--info {
  color: #e8a94f;
}

.safety {
  padding: 11px 13px;
  margin-bottom: 10px;
  border: 1px solid rgba(235, 101, 94, 0.35);
  border-radius: 8px;
  background: var(--ai-danger-bg);
  color: #b83a33;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
}

.panel--dark .safety {
  color: #ff9a94;
}

.phone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ai-text-secondary);
}

.phone b {
  color: var(--ai-text-primary);
}

.phone span {
  font-size: 12px;
  color: var(--ai-text-muted);
}

.steps {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ai-text-secondary);
}

.disclaimer {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  background: var(--ai-bg-secondary);
  border: 1px solid var(--ai-border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ai-text-tertiary);
}

.disclaimer a {
  color: var(--ai-link-color);
}

.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reason {
  padding: 4px 11px;
  border: 1px solid var(--ai-border);
  border-radius: 14px;
  background: var(--ai-bg);
  font-size: 12px;
  color: var(--ai-text-secondary);
  cursor: pointer;
}

.reason:hover {
  border-color: var(--ai-danger);
}

.reason[aria-pressed="true"] {
  border-color: var(--ai-danger);
  background: var(--ai-danger-bg);
  color: var(--ai-danger);
}

.followup {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px dashed var(--ai-brand);
  border-radius: 6px;
  color: #7a4d1d;
  font-size: 13px;
  line-height: 1.5;
}

.panel--dark .followup {
  color: #e8a94f;
}

.followup button {
  margin-top: 6px;
}

/* ───────── 输入框 ───────── */

.sender {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: var(--ai-sender-bg);
  border-top: 1px solid var(--ai-border);
}

.sender__box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 2px solid var(--ai-input-border);
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  padding: 8px 10px 8px 14px;
  background: var(--ai-input-bg);
  transition: border-color 0.2s;
}

.sender__box:focus-within {
  border-color: var(--ai-brand);
}

.sender textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  color: var(--ai-text-secondary);
  letter-spacing: -0.015em;
}

.sender textarea::placeholder {
  color: var(--ai-text-placeholder);
}

.sender__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.talk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--ai-border);
  border-radius: 14px;
  background: var(--ai-bg);
  color: var(--ai-text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.talk:hover {
  border-color: var(--ai-brand);
  color: var(--ai-brand-strong);
}

.send {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.send svg {
  width: 24px;
  height: 24px;
  display: block;
  transition: filter 0.2s;
}

.send:disabled svg {
  filter: grayscale(100%) opacity(0.4);
  cursor: default;
}

/* ───────── 目录页 ───────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  max-width: 1100px;
}

.navcard {
  display: block;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.18s;
}

.navcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.navcard h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.navcard p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #6e767d;
  line-height: 1.55;
}

.journeys {
  max-width: 1100px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.journeys h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.journeys p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #5b6166;
}

.journeys a {
  color: #a86a2c;
}

.foot {
  max-width: 1100px;
  margin-top: 28px;
  font-size: 12px;
  line-height: 1.7;
  color: #8b9299;
}

/* ───────── 响应式 ───────── */

@media (max-width: 1100px) {
  .shell {
    flex-direction: column;
  }

  .shell__side {
    width: 100%;
    height: auto;
    position: static;
    padding: 12px 0;
  }

  .shell__side a {
    display: inline-block;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .shell__side a[aria-current="page"] {
    border-left: none;
    border-bottom-color: var(--ai-brand, #dca164);
  }

  .shell__group {
    display: none;
  }

  .shell__main {
    padding: 20px 16px 40px;
  }
}

@media (max-width: 767px) {
  .panel,
  .panel--phone {
    width: 100%;
    max-width: 100%;
    height: 640px;
    border-radius: 10px;
    border-left-width: 1px;
    border-top: none;
    border-right: none;
    border-bottom: none;
  }

  .stage__item {
    max-width: 100%;
    width: 100%;
  }

  .btns--row {
    flex-direction: column;
  }
}

/* 面板内移动端：按钮纵向占满（NFR-04） */
.panel--phone .btns--row {
  flex-direction: column;
}

.panel--phone .bubble {
  font-size: 15px;
}
