/* =====================
   销售随身 AI 助手 · 移动端优先样式
   无第三方依赖，微信 / 手机浏览器直接打开
   ===================== */
:root {
  --bg: #f3f4f9;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --ink: #151823;
  --ink-2: #333849;
  --muted: #7b8296;
  --muted-2: #9aa1b3;
  --line: #e9ebf2;
  --primary: #5658e8;
  --primary-2: #8a61ff;
  --primary-ink: #3d3ec2;
  --tint: #eef0ff;
  --orange: #ff7a45;
  --green: #16a36a;
  --red: #e5484d;
  --amber: #e08a12;
  --shadow: 0 10px 28px -18px rgba(24, 28, 50, 0.35);
  --shadow-lg: 0 24px 60px -24px rgba(24, 28, 50, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% 0%, #2a2c5e 0%, transparent 60%),
    radial-gradient(800px 700px at 90% 100%, #3a2357 0%, transparent 55%),
    #0e1020;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(86, 88, 232, 0.2); }

/* ---------- App shell ---------- */
#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 28px;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.view::-webkit-scrollbar { display: none; }

@media (min-width: 760px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  #app {
    height: min(920px, calc(100dvh - 48px));
    min-height: 640px;
    border-radius: 30px;
    box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* ---------- Header / page ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 0 14px;
}
.page-head .grow { padding-top: 2px; }
.page-title {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.page-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}
.back-btn, .icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
}
.back-btn:active, .icon-btn:active { transform: scale(0.94); }
.head-actions { display: flex; gap: 8px; align-items: center; }

.section { margin-top: 22px; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 10px;
}
.sec-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.sec-title .count {
  margin-left: 4px;
  color: var(--muted-2);
  font-weight: 500;
}
.sec-link {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  border: 0;
  background: none;
  padding: 2px;
}
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb10 { margin-bottom: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: 6px;
  padding: 20px 20px 18px;
  border-radius: 26px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #4c4fe6 0%, #6f5bff 52%, #a05cff 100%);
  box-shadow: 0 22px 45px -22px rgba(78, 70, 230, 0.85);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 17px 17px;
  -webkit-mask-image: linear-gradient(140deg, #000 0%, transparent 65%);
  mask-image: linear-gradient(140deg, #000 0%, transparent 65%);
  opacity: 0.6;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  right: -70px;
  top: -85px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.live-pill i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7dffc4; box-shadow: 0 0 0 3px rgba(125, 255, 196, 0.2);
}
.hero-date { font-size: 11px; color: rgba(255, 255, 255, 0.76); }
.hero h1 {
  position: relative;
  margin-top: 16px;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-sub {
  position: relative;
  margin-top: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}
.hero-sub b { color: #fff; }
.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.hero-stat {
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}
.hero-stat b { display: block; font-size: 18px; line-height: 1.2; letter-spacing: -0.01em; }
.hero-stat span { display: block; margin-top: 2px; font-size: 10.5px; color: rgba(255, 255, 255, 0.72); }
.hero-actions { position: relative; display: flex; gap: 9px; margin-top: 16px; }
.hero-actions .btn { height: 42px; border-radius: 12px; font-size: 13.5px; }
.hero-btn-main {
  flex: 1;
  border: 0;
  background: #fff;
  color: #4547d6;
  font-weight: 700;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5);
}
.hero-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  padding: 0 15px;
}

/* ---------- Quick grid ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 13px 6px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 20px -16px rgba(20, 24, 40, 0.45);
  border: 1px solid rgba(24, 28, 50, 0.035);
  transition: transform 0.14s ease;
}
.quick:active { transform: scale(0.96); }
.quick .qi {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}
.ic-violet { background: #efedff; }
.ic-orange { background: #fff0e8; }
.ic-green { background: #e8f8ef; }
.ic-blue { background: #e9f2ff; }
.ic-pink { background: #ffeaf3; }
.ic-cyan { background: #e6f8f8; }

/* ---------- Card ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(24, 28, 50, 0.045);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 10px; }
.card.flush { padding: 0; overflow: hidden; }
.card.tint { background: linear-gradient(160deg, #f7f6ff, #fbfbff); border-color: #e7e5ff; }
.card.warn { background: #fffaf1; border-color: #f6e3bf; }
.card.danger { background: #fff6f6; border-color: #f7d9da; }
.card.glass { background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(12px); }
.card-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.card-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 0.14s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, #5658e8, #7d5cff);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(86, 88, 232, 0.7);
}
.btn.soft { background: var(--tint); color: var(--primary-ink); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.white { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.danger { background: #fff0f0; color: #c8353a; }
.btn.sm { height: 34px; border-radius: 10px; padding: 0 12px; font-size: 12.5px; }
.btn.xs { height: 28px; border-radius: 8px; padding: 0 9px; font-size: 11.5px; gap: 4px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }
.btn-row { display: flex; gap: 9px; }
.btn-row .btn { flex: 1; }

.arrow {
  width: 7px; height: 7px;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
}

/* ---------- Search / chips ---------- */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 13px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted-2);
  box-shadow: 0 6px 18px -16px rgba(20, 24, 40, 0.4);
}
.search svg { flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
}
.search input::placeholder { color: var(--muted-2); }

.chips { display: flex; gap: 7px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #e9ebf4;
  color: #62697c;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.chip.active {
  background: var(--primary);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 6px 14px -8px rgba(86, 88, 232, 0.7);
}
.chip.ghost { background: transparent; border-color: var(--line); }
.chip .x { opacity: 0.5; margin-left: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 550;
  background: #f0f1f7;
  color: #6a7185;
  white-space: nowrap;
}
.tag.violet { background: #efedff; color: #5b50c9; }
.tag.warn { background: #fff2df; color: #a96609; }
.tag.danger { background: #ffecec; color: #c13a3f; }
.tag.good { background: #e8f7ee; color: #178257; }
.tag.blue { background: #e9f2ff; color: #3566b8; }
.tag.plain { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---------- Customer list ---------- */
.cust-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid rgba(24, 28, 50, 0.045);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  transition: transform 0.14s ease;
}
.cust-card:active { transform: scale(0.985); }
.avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  background: linear-gradient(140deg, hsl(var(--h, 248) 78% 62%), hsl(calc(var(--h, 248) + 26) 72% 48%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.avatar.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 21px; }
.avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
.cust-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.intent {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}
.intent.a { background: linear-gradient(135deg, #ff8a5b, #f2563e); color: #fff; }
.intent.b { background: #e9edff; color: #5658c9; }
.intent.c { background: #eef0f5; color: #8b91a3; }
.cust-meta {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cust-tags { margin-top: 7px; }
.cust-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted-2);
  min-width: 0;
}
.cust-foot .last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f0f2f8;
  color: #6f7689;
  font-size: 10.5px;
  font-weight: 600;
}
.due.today { background: #fff0dc; color: #a96309; }
.due.overdue { background: #ffe9ea; color: #c33c42; }
.due.good { background: #e9f8ef; color: #16845a; }
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

.fab {
  position: absolute;
  right: 17px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 10;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #5658e8, #815cff);
  color: #fff;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 14px 30px -12px rgba(86, 88, 232, 0.9);
  display: grid;
  place-items: center;
  padding-bottom: 3px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.field > label .opt { font-weight: 400; color: var(--muted-2); }
.input, .textarea, select.input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  outline: none;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  appearance: none;
}
.textarea { min-height: 98px; resize: vertical; padding: 12px 13px; line-height: 1.65; }
.input:focus, .textarea:focus {
  border-color: rgba(86, 88, 232, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(86, 88, 232, 0.1);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, #8a90a3 50%), linear-gradient(135deg, #8a90a3 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .field { margin-bottom: 0; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.helper { margin: 7px 2px 0; font-size: 11px; line-height: 1.5; color: var(--muted-2); }
.form-actions { display: flex; gap: 9px; margin-top: 15px; }
.form-actions .btn { flex: 1; }

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #eef0f6;
}
.seg button {
  flex: 1;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.seg button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px -2px rgba(24, 28, 50, 0.16);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}
.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: #dfe2ec;
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 24, 40, 0.25);
  transition: transform 0.2s ease;
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(18px); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, #d8dbf0, #eceef6 80%, transparent);
}
.t-item { position: relative; padding-bottom: 17px; }
.t-item:last-child { padding-bottom: 2px; }
.t-item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #b9bce8;
  box-shadow: 0 0 0 3px #f6f7fc;
}
.t-item:first-child::before { border-color: var(--primary); }
.t-head { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted-2); }
.t-head b { font-size: 12px; color: var(--ink-2); font-weight: 650; }
.t-type {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--tint);
  color: var(--primary-ink);
  font-size: 10px;
  font-weight: 650;
}
.t-body {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #4c5265;
  word-break: break-word;
}
.t-sect { margin-top: 6px; display: grid; gap: 4px; }
.t-line { font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.t-line b { color: #5d6377; font-weight: 650; }

/* ---------- Scripts ---------- */
.sub-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #e9ebf3;
  margin: 2px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav button {
  flex: 1;
  min-width: 62px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #70778a;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.sub-nav button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 10px -3px rgba(24, 28, 50, 0.18);
}

.script-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(24, 28, 50, 0.045);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.script-head { display: flex; align-items: flex-start; gap: 8px; }
.script-title { font-size: 14px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; }
.script-body {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #5a6072;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.script-body.full { display: block; -webkit-line-clamp: unset; overflow: visible; white-space: pre-wrap; }
.script-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}
.script-foot .grow { display: flex; gap: 5px; flex-wrap: wrap; }
.star {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: #f4f5f9;
  color: #b6bbca;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.star.on { background: #fff6dc; color: #e0a312; }

.result-card {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e4e2ff;
  box-shadow: 0 14px 34px -24px rgba(86, 88, 232, 0.7);
  margin-bottom: 10px;
}
.result-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.result-label b { font-size: 12.5px; font-weight: 700; color: #4e50d8; }
.result-label .tag { height: 19px; }
.output {
  padding: 12px 13px;
  border-radius: 12px;
  background: #f8f9fd;
  border: 1px dashed #dfe3f3;
  font-size: 13.5px;
  line-height: 1.75;
  color: #3f4557;
  white-space: pre-wrap;
  word-break: break-word;
}
.output.small { font-size: 12.5px; line-height: 1.7; }
.output-edit {
  width: 100%;
  min-height: 220px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid #dfe3f3;
  background: #f8f9fd;
  outline: none;
  font-size: 13px;
  line-height: 1.75;
  resize: vertical;
}
.output-edit:focus { border-color: var(--primary); background: #fff; }
mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #ffe2b8;
  color: #9a4c00;
  font-weight: 650;
}

.warn-line {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff5e4;
  border: 1px solid #f8e3bd;
  color: #8c5900;
  font-size: 11px;
  line-height: 1.55;
}
.warn-line.red { background: #fff0f0; border-color: #f8d7d8; color: #b2353a; }
.warn-line .wi { flex: none; }

.copy-row { display: flex; gap: 7px; margin-top: 9px; }
.copy-row .btn { flex: 1; height: 36px; border-radius: 10px; font-size: 12px; }

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eef8f2;
  color: #188058;
  font-size: 10px;
  font-weight: 600;
}

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid rgba(24, 28, 50, 0.045);
  border-radius: 15px;
  margin-bottom: 9px;
  overflow: hidden;
  box-shadow: 0 8px 22px -20px rgba(20, 24, 40, 0.6);
}
.faq-q {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
}
.faq-q .qmark {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--tint);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.faq-q .arrow { margin-left: auto; transition: transform 0.2s ease; }
.faq-item.open .faq-q .arrow { transform: rotate(135deg); }
.faq-a {
  display: none;
  padding: 0 14px 13px 46px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #5a6072;
}
.faq-a .faq-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.faq-item.open .faq-a { display: block; }
.faq-a .faq-copy { margin-top: 9px; }

/* ---------- Notice / upload / minutes ---------- */
.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 13px;
  background: #eef1ff;
  border: 1px solid #e0e4ff;
  color: #5058b8;
  font-size: 11.5px;
  line-height: 1.6;
}
.notice .ni { flex: none; font-size: 15px; }
.notice.orange { background: #fff8ed; border-color: #f8e6c8; color: #8c5900; }

.upload {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: 13px;
  border: 1px dashed #cfd4e8;
  background: #fafbff;
  color: var(--muted);
  font-size: 12px;
}
.upload .ui {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--tint);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 17px;
}
.upload b { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 650; }
.upload .filename { margin-top: 2px; color: var(--primary); font-size: 11px; word-break: break-all; }

.mic-row { display: flex; align-items: flex-end; gap: 8px; }
.mic-row .textarea { flex: 1; }
.mic-btn {
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #f1edff;
  color: var(--primary);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.2s ease;
}
.mic-btn svg { width: 21px; height: 21px; }
.mic-btn:active { transform: scale(0.93); }
.mic-btn.rec {
  background: #ffe8e8;
  color: #e5484d;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.36); }
  70% { box-shadow: 0 0 0 12px rgba(229, 72, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.meta-cell { padding: 11px 12px; background: #fff; }
.meta-cell span { display: block; font-size: 10.5px; color: var(--muted-2); }
.meta-cell b { display: block; margin-top: 2px; font-size: 13px; font-weight: 650; color: var(--ink-2); word-break: break-word; }

/* ---------- Stats / bars ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat-box {
  padding: 13px 12px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid rgba(24, 28, 50, 0.045);
  box-shadow: var(--shadow);
}
.stat-box .sn { font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.stat-box .sl { margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.stat-box .sn small { font-size: 11px; font-weight: 600; margin-left: 2px; color: var(--muted); }

.bar-list { display: grid; gap: 11px; }
.bar-row { display: flex; align-items: center; gap: 9px; }
.bar-label { width: 84px; flex: none; font-size: 11.5px; color: #5d6377; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar {
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: #edeef5;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #6568f0, #a07bff);
  min-width: 3px;
}
.bar-val { width: 36px; flex: none; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- More / menu ---------- */
.profile-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #24274c, #3a2d63 60%, #503a7a);
  box-shadow: 0 20px 40px -24px rgba(16, 18, 40, 0.9);
  position: relative;
  overflow: hidden;
}
.profile-card::after {
  content: "";
  position: absolute;
  width: 150px; height: 150px;
  right: -50px; top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
}
.profile-card .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
.profile-card h3 { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.profile-card p { margin-top: 2px; font-size: 11.5px; color: rgba(255, 255, 255, 0.64); }
.profile-card .pill {
  margin-top: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.85);
}

.menu-group {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid rgba(24, 28, 50, 0.045);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid #f0f2f8;
  min-height: 58px;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row:active { background: #fafbff; }
.menu-ico {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.menu-txt b { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.menu-txt span { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted-2); }
.menu-arrow { margin-left: auto; color: #c4c8d6; font-size: 18px; line-height: 1; }

/* ---------- Sheet / overlay ---------- */
#overlays { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(12, 14, 28, 0.46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
  animation: fadeIn 0.18s ease;
}
.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 91dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.4);
  animation: sheetUp 0.28s cubic-bezier(0.22, 0.8, 0.25, 1);
  overflow: hidden;
}
.sheet-head {
  position: relative;
  flex: none;
  padding: 8px 18px 12px;
  border-bottom: 1px solid #f1f2f8;
}
.sheet-grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #dcdfe9;
  margin: 0 auto 10px;
}
.sheet-title-row { display: flex; align-items: center; gap: 10px; }
.sheet-title { flex: 1; font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.sheet-close {
  width: 32px; height: 32px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: #f2f4f9;
  color: #777e90;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.sheet-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 15px 18px calc(20px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.sheet-foot {
  flex: none;
  padding: 11px 18px calc(13px + env(safe-area-inset-bottom));
  border-top: 1px solid #f1f2f8;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}
@keyframes sheetUp {
  from { transform: translateY(30px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 760px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet {
    max-height: min(820px, 88vh);
    border-radius: 24px;
    animation: popIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 16px; }
  @keyframes popIn {
    from { transform: scale(0.97) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
  }
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 200;
  transform: translate(-50%, 12px);
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(22, 24, 38, 0.94);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { background: #137a52; }
#toast.err { background: #b2353a; }

/* ---------- Empty ---------- */
.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted-2);
}
.empty .emoji { font-size: 32px; line-height: 1; margin-bottom: 9px; opacity: 0.9; }
.empty b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.empty p { margin-top: 3px; font-size: 11.5px; line-height: 1.6; }

/* ---------- Misc ---------- */
.pill-row { display: flex; gap: 5px; flex-wrap: wrap; }
.kv { display: grid; gap: 8px; }
.kv .row { justify-content: space-between; font-size: 12.5px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink-2); font-weight: 550; text-align: right; }
.divider { height: 1px; background: #f0f2f8; margin: 12px 0; }
.hint-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
}
.copied {
  color: var(--green) !important;
}
.spin {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -1px;
  margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tag-input-wrap { display: flex; gap: 7px; }
.tag-input-wrap .input { flex: 1; }
.sensitive-list { display: flex; flex-wrap: wrap; gap: 7px; }
.sensitive-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 9px;
  border-radius: 8px;
  background: #fff1f1;
  color: #b2353a;
  font-size: 11.5px;
  border: 1px solid #f8dada;
}
.sensitive-chip button {
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.5;
  padding: 0;
  font-size: 13px;
  line-height: 1;
}

.voice-note {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.usage-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); margin-top: 8px; }

.rate-list { display: grid; gap: 10px; }
.rate-item { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.6; color: #5a6072; }
.rate-num {
  flex: none;
  width: 19px; height: 19px;
  border-radius: 6px;
  background: var(--tint);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
  margin-top: 1px;
}

/* ---------- Tab bar ---------- */
.tabbar {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(24, 28, 50, 0.06);
  z-index: 20;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #9aa1b3;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.01em;
  transition: color 0.16s ease;
}
.tab svg { width: 22px; height: 22px; stroke-width: 1.7; }
.tab.active { color: var(--primary); font-weight: 700; }
.tab.active svg { stroke-width: 2.1; }
.tab:active { background: #f3f4f9; }

/* ---------- Print ---------- */
#print-root { display: none; }
@media print {
  body { background: #fff !important; padding: 0 !important; display: block !important; }
  #app, #overlays, #toast, .tabbar { display: none !important; }
  #print-root {
    display: block !important;
    padding: 0;
    color: #111;
    font-family: var(--font);
    font-size: 11.5pt;
    line-height: 1.75;
    white-space: pre-wrap;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 360px) {
  .view { padding-left: 13px; padding-right: 13px; }
  .hero { padding: 17px 16px 16px; }
  .hero h1 { font-size: 24px; }
  .quick-grid { gap: 8px; }
  .quick { font-size: 11px; padding: 11px 4px; }
  .quick .qi { width: 34px; height: 34px; font-size: 16px; }
  .page-title { font-size: 22px; }
  .stat-grid { gap: 7px; }
}

.focus-ring:focus-visible, .btn:focus-visible, .tab:focus-visible, .chip:focus-visible {
  outline: 2px solid rgba(86, 88, 232, 0.6);
  outline-offset: 2px;
}

/* ---------- 登录页 ---------- */
.login-screen {
  min-height: 100%;
  margin: 0 -16px -28px;
  padding: calc(40px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(520px 320px at 80% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(480px 420px at 0% 100%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(158deg, #4245dd 0%, #6b53fb 52%, #9b5bff 100%);
}
@media (min-width: 760px) { .login-screen { border-radius: 30px; } }
.login-brand { text-align: center; padding: 4px 0 22px; }
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.55);
  display: block;
  margin: 0 auto 14px;
}
.login-brand h1 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-brand p {
  margin-top: 7px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.76);
}
.login-card {
  margin: 0;
  padding: 18px 17px 16px;
  border-radius: 22px;
  background: #fff;
  border: 0;
  box-shadow: 0 26px 60px -24px rgba(20, 18, 60, 0.6);
}
.login-card .field { margin-bottom: 12px; }
.login-card .field > label { color: #5a6072; font-size: 12px; }
.login-card .input {
  background: #f7f8fc;
  border-color: #e5e7f1;
  color: #151823 !important;
  -webkit-text-fill-color: #151823 !important;
  caret-color: var(--primary);
}
.login-card .input::placeholder {
  color: var(--muted-2) !important;
  -webkit-text-fill-color: var(--muted-2) !important;
}
.login-card .input:-webkit-autofill,
.login-card .input:-webkit-autofill:hover,
.login-card .input:-webkit-autofill:focus {
  -webkit-text-fill-color: #151823 !important;
  -webkit-box-shadow: 0 0 0 1000px #f7f8fc inset;
  transition: background-color 9999s ease-out 0s;
}
.login-error {
  min-height: 16px;
  margin: 0 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
}
.login-help {
  margin: 10px 2px 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}
.login-demo { margin-top: 22px; }
.login-demo-title {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.74);
  margin: 0 2px 9px;
}
.login-demo-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-align: left;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.login-demo-row:active { transform: scale(0.985); background: rgba(255, 255, 255, 0.2); }
.login-demo-role {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
}
.login-demo-role.admin { background: #ffd88a; color: #6b4400; }
.login-demo-row b { font-size: 13.5px; }
.login-demo-row span:last-child {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}
.login-foot {
  margin: 14px 2px 0;
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- 人员 / 账号 ---------- */
.user-card { padding: 14px 14px 12px; }
.user-actions {
  margin-top: 11px;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.account-card {
  background: linear-gradient(150deg, #f7f6ff, #fdfdff);
  border-color: #e7e5ff;
}
.ai-test {
  margin: 10px 2px 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}
.ai-test.good {
  padding: 9px 11px;
  border-radius: 11px;
  background: #e9f8ef;
  border: 1px solid #bfe9cf;
  color: #16794f;
}
.ai-test.good b { display: block; font-size: 12.5px; }
.ai-test.good span { display: block; margin-top: 2px; color: #2c7f5c; }
.ai-test.bad {
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff2f2;
  border: 1px solid #f6d5d6;
  color: #b73338;
}
.ai-test.bad b { display: block; font-size: 12.5px; }
.ai-test.bad span { display: block; margin-top: 2px; word-break: break-all; color: #a84346; }
.ai-test.bad em { display: block; margin-top: 5px; font-style: normal; font-size: 10.5px; color: #b06a6b; }
.ai-test.warn {
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff8ed;
  border: 1px solid #f6e3bf;
  color: #8c5900;
}

/* ---------- AI 状态指示灯 / 来源标签 ---------- */
.ai-glint {
  position: absolute;
  left: 14px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 64%;
  padding: 7px 11px;
  border: 1px solid rgba(24, 28, 50, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px -12px rgba(24, 28, 50, 0.35);
  color: #5a6072;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}
.ai-glint[hidden] { display: none; }
.ai-glint-txt {
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa1b3;
  flex: none;
}
.ai-glint[data-state="working"] { color: var(--primary-ink); border-color: rgba(86, 88, 232, 0.22); }
.ai-glint[data-state="working"] .ai-dot {
  background: #5658e8;
  animation: aiBreathe 1.15s ease-in-out infinite;
}
.ai-glint[data-state="done"] { color: #16794f; border-color: #bfe9cf; background: #eefaf3; }
.ai-glint[data-state="done"] .ai-dot { background: #178257; }
.ai-glint[data-state="fallback"] { color: #8c5900; border-color: #f6e3bf; background: #fff8ed; }
.ai-glint[data-state="fallback"] .ai-dot { background: #d98300; }
.ai-glint[data-state="local"] { color: #6a7185; }

@keyframes aiBreathe {
  0%, 100% { opacity: 0.35; box-shadow: 0 0 0 0 rgba(86, 88, 232, 0.45); transform: scale(0.8); }
  50% { opacity: 1; box-shadow: 0 0 0 7px rgba(86, 88, 232, 0); transform: scale(1.05); }
}

.ai-src {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: #eef0f7;
  color: #6a7185;
  white-space: nowrap;
  flex: none;
}
.ai-src i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ai-src.model { background: #e8f7ee; color: #178257; }
.ai-src.error { background: #fff2df; color: #a96609; }

.ai-terms {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f8fc;
  border: 1px solid var(--line);
}
.ai-terms b { display: block; font-size: 11.5px; color: var(--ink-2); margin-bottom: 6px; }
.ai-terms ul { display: grid; gap: 5px; }
.ai-terms li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: #5a6072;
  word-break: break-word;
}
.ai-terms em { font-style: normal; color: var(--primary); text-align: right; }

.ai-info {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 13px;
  background: #f7f8fc;
  border: 1px solid var(--line);
}
.ai-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.ai-info-row span { color: var(--muted); flex: none; }
.ai-info-row b { color: var(--ink-2); text-align: right; word-break: break-word; }
.ai-info-row.err b { color: #b73338; }
