/* app-specific finishing layer */
.brand small,
.workspace-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.brand small {
  color: #aab3cf;
  margin-top: 2px;
}
.nav-item i {
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pop);
}
.workspace-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
}
.workspace-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.reset-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #aab3cf;
  cursor: pointer;
  border-radius: 10px;
}
.reset-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.demo-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.12);
}
.credit-button,
.avatar-button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.credit-button {
  color: var(--brand);
  font-size: 12px;
}
.avatar-button {
  padding: 3px;
}
.avatar-button .avatar {
  width: 30px;
  height: 30px;
}
.floating-caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.floating-caption span {
  font-size: 16px;
  font-weight: 600;
}
.floating-caption small {
  color: rgba(255, 255, 255, 0.7);
}
.video-stamp {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
}
.action-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
}
.action-card > .action-icon {
  grid-row: 1/3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.action-card > strong {
  font-size: 14px;
}
.action-card > span:not(.action-icon):not(.action-arrow) {
  font-size: 12px;
  color: var(--muted);
}
.action-arrow {
  grid-column: 3;
  grid-row: 1/3;
  align-self: center;
  color: #98a0b2;
}
.new-work {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  border: 1px dashed #cfd4df;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.new-work > .icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.new-work strong {
  color: var(--ink);
}
.new-work:hover {
  border-color: var(--brand);
  background: #f7f9ff;
}
.missing {
  display: grid;
  place-items: center;
  gap: 6px;
  height: 100%;
  min-height: 120px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(12, 22, 51, 0.82);
  color: #fff;
}
.duration-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(8, 12, 32, 0.7);
  color: #fff;
  font-size: 11px;
}
.studio-grid,
.knowledge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 24px;
}
.creator-panel {
  text-align: center;
}
.creator-panel .field {
  text-align: left;
  margin-top: 18px;
}
.portrait-large {
  width: 104px;
  height: 104px;
  margin: 0 auto 12px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--brand-soft);
}
.material-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.material-picker .media-card {
  padding: 0;
  text-align: left;
}
.selection-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}
.form-error {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff1f1;
  color: var(--bad);
  border: 1px solid #ffd6d6;
}
.full-width {
  width: 100%;
}
.icon-only {
  padding: 0;
  width: 38px;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.check-line input {
  accent-color: var(--brand);
}
.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.service-shell {
  margin-top: 24px;
}
.service-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.service-toolbar .tabs {
  flex: 1;
}
.auth-demo {
  text-align: center;
  padding: 20px 0;
}
.auth-symbol,
.assistant-symbol {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
}
.auth-steps {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}
.incoming-options {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.price {
  color: var(--brand);
  font-size: 20px;
}
.script-preview,
.qa-answer {
  padding: 14px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: pre-wrap;
  line-height: 1.8;
}
.qa-answer {
  margin-top: 16px;
}
.qa-answer.needs-knowledge {
  background: #fff8eb;
  border-color: #ffe2ad;
}
.knowledge-list {
  display: grid;
  gap: 10px;
}
.knowledge-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.doc-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}
.knowledge-item > div:nth-child(2) {
  min-width: 0;
}
.knowledge-item > div:nth-child(2) span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.row-actions {
  display: flex;
  gap: 4px;
}
.service-main {
  margin-top: 24px;
}
.service-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.channel-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}
.conversation .avatar {
  width: 36px;
  height: 36px;
}
.suggestion {
  padding: 14px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: 10px;
}
.platform-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #101828;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.platform-mark.wechat {
  background: #07c160;
}
.material-preview {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 10px;
  background: #101828;
}
.video-layout {
  min-height: 0;
}
.map-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.map-toolbar .field {
  flex: 1;
  min-width: 180px;
}
.lead-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.acq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 24px;
}
.list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.map-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .studio-grid,
  .knowledge-grid,
  .acq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .creator-panel {
    order: -1;
    text-align: left;
  }
  .portrait-large {
    margin: 0 0 12px;
  }
  .material-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .demo-label {
    display: none;
  }
  .credit-button span {
    display: none;
  }
  .material-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .knowledge-item {
    grid-template-columns: auto 1fr auto;
  }
  .knowledge-item .row-actions {
    grid-column: 2/-1;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn {
    flex: 1;
  }
  .hero-media {
    min-height: 320px;
  }
}

/* ---------- completion layer: classes used by app.js ---------- */
.btn.glass {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn.glass:hover {
  background: rgba(255, 255, 255, 0.24);
}
.panel > .section-head:first-child,
.panel > .split:first-child {
  margin-top: 0;
}
.panel h2 {
  font-size: 18px;
}
.panel > * + .field,
.panel > .field + *,
.panel > .chips,
.panel > .check-line {
  margin-top: 14px;
}
.panel > p.muted {
  margin-top: 10px;
  font-size: 13px;
}
.panel > .btn {
  margin-top: 18px;
}
.letter-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-soft), var(--ai-soft));
  color: var(--brand);
  font-size: 13px;
  font-weight: 650;
}
.table-person {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 550;
  white-space: nowrap;
}
.input.compact {
  width: 220px;
  min-height: 36px;
  padding: 6px 12px;
}

/* 工作台 */
.hero {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  align-items: stretch;
}
.hero-media {
  min-height: 460px;
}
.hero-copy {
  bottom: 32px;
}
.hero-copy .eyebrow {
  display: block;
}
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 4px 4px;
}
.side-head strong {
  font-size: 15px;
}
.hero-side .action-card {
  flex: 1;
  width: 100%;
  align-content: center;
}

/* 智能获客 */
.task-overview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-overview .eyebrow {
  margin: 0;
}
.large-number {
  font-size: 48px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}
.large-number small {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.task-overview .progress {
  margin-top: auto;
}
.acquisition-top {
  align-items: stretch;
}

/* 地图获客 */
.map-search .fields {
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: end;
}
.map-search .btn {
  height: 42px;
}
.saved-searches {
  align-items: center;
  margin-bottom: 14px;
}
.map-list .empty {
  margin: 16px;
}
.merchant {
  width: 100%;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}
.merchant > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.merchant span,
.merchant small {
  font-size: 12px;
  color: var(--muted);
}
.merchant > .icon:last-child {
  color: #b3b9c7;
}
.merchant-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}
.map-canvas > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-caption {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}
.map-pin {
  position: absolute;
  z-index: 1;
  width: 32px;
  height: 32px;
  translate: -50% calc(-100% - 6px);
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.28);
  cursor: pointer;
  transition: scale 0.2s var(--ease);
}
.map-pin:hover {
  scale: 1.12;
}
.map-pin.selected {
  z-index: 2;
  background: #ff5a5f;
  scale: 1.25;
}
.map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  translate: -50% 0;
  border: 6px solid transparent;
  border-top-color: #fff;
}
.map-detail {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  width: min(300px, calc(100% - 32px));
  padding: 16px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
  display: grid;
  gap: 6px;
  font-size: 13px;
  animation: pop 0.2s var(--ease);
}
.map-note {
  margin-top: 12px;
  font-size: 12px;
}

/* 短视频 */
.source-tabs {
  margin: 14px 0 16px;
}
.step {
  font-size: 14px;
}
.creator-panel h2 {
  margin-bottom: 14px;
}
.creator-panel .pill {
  margin: 8px 0;
}
.creator-panel > .btn {
  margin-top: 12px;
}
.material-picker .media-card.selected::after {
  display: none;
}
.material-picker .selection-dot:empty {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid #cfd4df;
}
.material-picker .media-body {
  font-size: 13px;
  font-weight: 550;
}
.script-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  align-items: start;
}
.order-summary {
  position: sticky;
  top: 88px;
}
.order-summary h2 {
  margin-bottom: 14px;
}
.order-summary .persona-inline {
  margin-bottom: 8px;
}
.order-summary .btn {
  margin-top: 16px;
}
.render-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
}
.render-panel .progress {
  width: min(520px, 100%);
}
.render-orbit {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 82%, transparent 83%),
    conic-gradient(var(--brand) calc(var(--p, 0) * 1%), #eceef4 0);
  color: var(--brand);
  margin-bottom: 8px;
}
.render-orbit .icon {
  width: 22px;
  height: 22px;
  animation: spin 3s linear infinite;
}
.render-orbit span {
  font-size: 26px;
  font-weight: 650;
  color: var(--ink);
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
.render-panel h2 {
  font-size: 22px;
}
.render-stages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 12px;
}
.render-stages span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f4f5f9;
  color: var(--muted);
  font-size: 13px;
}
.render-stages span.done {
  background: #e7f8ef;
  color: #067647;
}
.render-stages .icon {
  width: 15px;
  height: 15px;
}
.completion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 24px 32px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff, var(--brand-soft));
  border: 1px solid var(--brand-line);
  border-radius: 20px;
  text-align: center;
}
.completion-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  box-shadow: 0 0 0 10px rgba(18, 183, 106, 0.12);
  margin-bottom: 10px;
}
.completion-icon .icon {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}
.work-card .media-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.work-card h3 {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--surface);
  color: var(--brand);
}
dialog:has(.video-layout) {
  width: min(880px, calc(100vw - 32px));
}
dialog .video-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}
dialog .player {
  width: 100%;
  height: auto;
  max-height: 70dvh;
}
dialog .video-layout > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 智能客服 */
.platform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.platform-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #111;
}
.platform-dot.wechat {
  background: #07c160;
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.connect-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
}
.connect-empty h2 {
  font-size: 22px;
}
.connect-empty small {
  color: var(--muted);
}
.connect-illustration {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #111;
  color: #fff;
  margin-bottom: 6px;
}
.connect-illustration.wechat {
  background: #07c160;
}
.connect-illustration > .icon {
  width: 34px;
  height: 34px;
}
.connect-illustration span {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.15);
}
.connect-illustration span .icon {
  width: 16px;
  height: 16px;
}
.connect-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 12px;
  margin: 12px 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: cs;
}
.connect-steps li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  background: #f7f8fb;
  counter-increment: cs;
  font-size: 13px;
}
.connect-steps li::before {
  content: counter(cs);
  width: 22px;
  height: 22px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
}
.connect-steps span {
  color: var(--muted);
  font-size: 12px;
}
.service-config {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.service-config .persona-inline {
  padding: 0;
  border: 0;
}
.persona-inline > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.persona-inline > div span,
.persona-inline > div p {
  font-size: 12px;
  color: var(--muted);
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--muted);
  font-size: 12px;
}
.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b3b9c7;
}
.status-dot.on {
  background: #e7f8ef;
  color: #067647;
}
.status-dot.on::before {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.18);
}
.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.inline-select .select {
  width: auto;
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.conversations {
  display: flex;
  flex-direction: column;
}
.conversations > .input {
  width: auto;
  margin: 0 12px 8px;
  min-height: 36px;
  padding: 6px 12px;
}
.conversation-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 10px;
}
.conversation-head span {
  padding: 0 8px;
  border-radius: 999px;
  background: #f0f2f5;
  font-size: 12px;
  color: var(--muted);
}
.conversation {
  width: 100%;
  align-items: center;
  border: 0;
  background: none;
  text-align: left;
}
.conversation > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.conversation small {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation.active {
  box-shadow: inset 3px 0 0 var(--brand);
}
.conversation .unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
}
.chat-head > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chat-head > div span {
  font-size: 12px;
  color: var(--muted);
}
.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.message.outgoing {
  align-items: flex-end;
}
.message small {
  font-size: 11px;
  color: var(--muted);
}
.chat-compose {
  flex-direction: column;
  align-items: stretch;
}
.chat-compose .split {
  flex-wrap: nowrap;
}
.assistant-panel .section-head {
  margin: 0;
}
.assistant-panel h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.assistant-panel h3 .icon {
  color: var(--brand);
}
.assistant-panel > .badge {
  align-self: flex-start;
}
.suggestion {
  line-height: 1.7;
}
.suggestion-actions {
  display: flex;
  gap: 8px;
}
.assistant-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 12px;
  border: 1px dashed #d5d9e3;
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.assistant-idle .icon {
  width: 28px;
  height: 28px;
  color: #b3b9c7;
}
.assistant-idle h3 {
  color: var(--ink);
  font-size: 14px;
}
.attention-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: #fff8eb;
  border: 1px solid #ffe2ad;
  color: #93370d;
  font-size: 13px;
}
.assistant-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.assistant-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 550;
}
.assistant-footer .icon {
  width: 15px;
  height: 15px;
}

/* 我的人设 */
.profile-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.profile-identity {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.profile-identity .portrait-large {
  width: 120px;
  height: 120px;
  margin-bottom: 0;
}
.profile-identity > .btn {
  align-self: center;
}
.profile-identity .field {
  text-align: left;
}
.profile-identity > p.muted,
.profile-identity > small {
  font-size: 12px;
}
.profile-grid .stack > .panel > .row-actions {
  margin-top: 16px;
}
.profile-grid .fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}
.interview {
  margin-top: 14px;
  padding: 18px;
}
.question {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.question-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 650;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.question .textarea {
  min-height: 64px;
}
#recording-list:not(:empty) {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

/* 素材库 / 知识库 */
.folder-tabs + .section-head {
  margin-top: 20px;
}
.materials-grid .media-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
}
.media-body h3 {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.knowledge-list {
  margin-top: 4px;
}
.knowledge-grid > .panel > p.muted {
  margin-top: 14px;
}
.qa-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qa-panel > * {
  margin: 0 !important;
}
.qa-panel .assistant-symbol {
  margin: 0 0 4px !important;
  width: 48px;
  height: 48px;
}
.qa-panel .textarea {
  min-height: 90px;
}

/* 移动端 */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .side-head {
    grid-column: 1/-1;
  }
  .profile-grid,
  .script-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-identity,
  .order-summary {
    position: static;
  }
}
@media (max-width: 900px) {
  .map-search .fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .connect-steps {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  dialog .video-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  dialog .player {
    max-height: 50dvh;
    width: auto;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .input.compact {
    width: 100%;
  }
  .row-actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .hero-side {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-grid .fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .large-number {
    font-size: 36px;
  }
}

/* 授权弹窗 */
.auth-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
}
.auth-symbol.douyin {
  background: #111;
  color: #fff;
}
.qr {
  position: relative;
  width: 188px;
  height: 188px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.qr svg {
  width: 100%;
  height: 100%;
  filter: blur(0.3px);
  opacity: 0.9;
}
.qr span {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  padding: 3px 10px;
  border-radius: 6px;
  background: #07c160;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 0 0 4px #fff;
}
.auth-steps span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f5f9;
}
.auth-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.auth-note .icon {
  width: 14px;
  height: 14px;
}

/* 视觉走查微调 */
.hero-media::after {
  background: linear-gradient(180deg, rgba(8, 12, 32, 0) 30%, rgba(8, 12, 32, 0.55) 60%, rgba(8, 12, 32, 0.88));
}
.hero-copy .eyebrow {
  color: #e4dcff;
}
.inbox {
  height: max(520px, calc(100dvh - 370px));
}
.lead-feed {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lead-feed li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f8fb;
  font-size: 13px;
  animation: pop 0.3s var(--ease);
}
.lead-feed li > span:last-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.lead-feed strong {
  margin-right: 8px;
  color: var(--ink);
}

/* 品牌 */
.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}
.brand > span {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  letter-spacing: 0.02em;
}

/* 顶栏账号菜单 */
.user-menu {
  position: relative;
}
.user-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16);
  animation: pop 0.18s var(--ease);
}
.user-pop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.user-pop-head div {
  display: flex;
  flex-direction: column;
}
.user-pop-head span {
  font-size: 12px;
  color: var(--muted);
}
.user-pop > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.user-pop > button:hover {
  background: #f4f5f9;
}
.user-pop > button:last-child {
  color: var(--bad);
}

/* 算力点 */
.credit-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), #fff);
  border: 1px solid var(--brand-line);
}
.credit-summary span,
.credit-summary small {
  color: var(--muted);
  font-size: 12px;
}
.credit-summary strong {
  font-size: 32px;
  letter-spacing: -0.02em;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.plan span {
  color: var(--brand);
  font-weight: 650;
}
.plan.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}
.agreement {
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.agreement h4 {
  margin-top: 6px;
  color: var(--ink);
}

/* 扫码状态 */
.qr .qr-state:empty {
  display: none;
}
.qr .qr-state {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--ok);
}
.qr .qr-state .icon {
  width: 26px;
  height: 26px;
  stroke-width: 2.6;
}
.qr.scanned svg {
  opacity: 0.25;
  filter: blur(1.5px);
}

/* 登录页 */
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr);
  min-height: 100vh;
  background: var(--surface);
}
.login-art {
  position: relative;
  overflow: hidden;
  background: var(--nav);
  color: #fff;
}
.login-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}
.login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(107, 123, 255, 0.45), transparent 70%),
    linear-gradient(180deg, rgba(12, 22, 51, 0.2), rgba(12, 22, 51, 0.92));
}
.login-art-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  height: 100%;
  padding: 56px 64px 72px;
}
.login-art-inner .login-brand {
  position: absolute;
  top: 48px;
  left: 64px;
}
.login-art h1 {
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.login-art p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}
.login-points {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.login-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}
.login-points .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}
.login-points span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}
.login-points strong {
  color: #fff;
  font-size: 14px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.login-brand.light span {
  font-size: 20px;
  font-weight: 650;
}
.login-brand div {
  display: flex;
  flex-direction: column;
}
.login-brand div strong {
  font-size: 20px;
}
.login-brand div span {
  font-size: 12px;
  color: var(--muted);
}
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 48px 24px;
}
.login-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(380px, 100%);
}
.login-card h2 {
  margin-top: 20px;
  font-size: 26px;
}
.login-tabs {
  display: flex;
}
.login-tabs .tab {
  flex: 1;
  justify-content: center;
}
.code-row {
  display: flex;
  gap: 10px;
}
.code-row .btn {
  flex: none;
  width: 118px;
  height: 42px;
}
.login-submit {
  height: 46px;
  margin-top: 4px;
  font-size: 15px;
}
.login-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f1;
  color: var(--bad);
  font-size: 13px;
}
.login-card .check-line {
  margin: 0;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 4px;
}
.login-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.login-alt::before,
.login-alt::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.login-wechat {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: #07c160;
  cursor: pointer;
}
.login-foot {
  font-size: 12px;
  color: #98a0b2;
}
@media (max-width: 900px) {
  .login {
    grid-template-columns: minmax(0, 1fr);
  }
  .login-art {
    display: none;
  }
}

/* ---------- 配色 v2：行动橙 + AI 紫 ---------- */
.btn.pop {
  background: linear-gradient(135deg, var(--pop), var(--pop-strong));
  background-color: var(--pop-strong);
  color: #fff;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--pop) 70%, transparent);
}
.btn.pop:hover {
  background: var(--pop-strong);
}
.badge.ai {
  background: var(--ai-soft);
  color: var(--ai-strong);
}
.badge.ai .icon {
  width: 13px;
  height: 13px;
}
/* AI 时刻：紫色只出现在这里 */
.assistant-panel h3 .icon,
.render-orbit,
.qa-panel .assistant-symbol,
.ai-panel .section-head .btn .icon {
  color: var(--ai);
}
.assistant-panel.ai-surface {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ai-soft) 55%, #fff), #fff 40%);
}
.suggestion {
  background: var(--ai-soft);
  border-color: color-mix(in srgb, var(--ai) 25%, transparent);
}
.render-orbit {
  background:
    radial-gradient(closest-side, #fff 82%, transparent 83%),
    conic-gradient(from 0deg, var(--brand), var(--ai) calc(var(--p, 0) * 1%), #eceef4 0);
}
.render-panel .progress-bar,
.task-overview .progress-bar {
  background: var(--ai-gradient);
}
.qa-panel .assistant-symbol {
  background: var(--ai-soft);
}
.ai-panel .textarea:focus {
  border-color: var(--ai);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ai) 14%, transparent);
}
/* 高光时刻：橙色 */
.large-number {
  color: var(--pop-strong);
}
.map-pin.selected {
  background: var(--pop);
}
.conversation .unread {
  background: var(--pop);
}
.completion {
  background:
    radial-gradient(60% 120% at 50% 0%, color-mix(in srgb, var(--pop) 12%, transparent), transparent 70%),
    linear-gradient(180deg, #fff, var(--brand-soft));
}
.hero-media::before {
  content: "";
  position: absolute;
  z-index: 1;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 70%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--pop) 35%, transparent), transparent);
  pointer-events: none;
  mix-blend-mode: screen;
}
.hero-copy .eyebrow {
  color: #ffd2bf;
}
.nav-item.active {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  box-shadow: inset 3px 0 0 var(--pop);
}
.nav-item i {
  background: var(--pop);
}
.action-card:hover .action-arrow {
  color: var(--pop-strong);
}
.login-art::after {
  background:
    radial-gradient(55% 45% at 15% 15%, color-mix(in srgb, var(--ai) 45%, transparent), transparent 70%),
    radial-gradient(40% 35% at 90% 85%, color-mix(in srgb, var(--pop) 30%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(12, 22, 51, 0.2), rgba(12, 22, 51, 0.92));
}

/* 次级按钮：统一给浅灰底，避免"裸文字"按钮 */
.btn.ghost {
  background: #f0f2f7;
  color: #475067;
}
.btn.ghost:hover {
  background: #e4e7ef;
  color: var(--ink);
}
.dialog-head .btn.ghost,
.map-detail .btn.ghost {
  background: transparent;
}
.dialog-head .btn.ghost:hover,
.map-detail .btn.ghost:hover {
  background: #f0f2f7;
}
.hero-side .action-arrow,
.btn.glass {
  background-color: rgba(255, 255, 255, 0.14);
}

/* ---------- 阶段 1：知识库录入 ---------- */
.kb-entries {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kb-voice,
.kb-entry {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.kb-voice:hover,
.kb-entry:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.kb-voice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background:
    radial-gradient(80% 140% at 100% 0%, color-mix(in srgb, var(--ai) 16%, transparent), transparent 60%),
    linear-gradient(135deg, #fff, var(--ai-soft));
  border-color: color-mix(in srgb, var(--ai) 25%, transparent);
}
.kb-voice > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kb-voice strong {
  font-size: 16px;
}
.kb-voice small,
.kb-entry small {
  color: var(--muted);
  font-size: 12px;
}
.kb-voice > .icon {
  color: var(--ai);
}
.kb-voice-icon {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--ai-gradient);
  color: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ai) 14%, transparent);
}
.kb-voice-icon .icon {
  width: 24px;
  height: 24px;
}
.kb-entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 16px 18px;
}
.kb-entry > .icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

/* 录音 / 录视频弹窗 */
.recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}
.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 64px;
}
.wave i {
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: var(--ai-gradient);
  animation: wave 0.9s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes wave {
  50% {
    height: 60px;
  }
}
.cam {
  position: relative;
  width: 100%;
  height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 14px;
  background: #101828;
  color: #98a2b3;
}
.cam > .icon {
  width: 56px;
  height: 56px;
}
.rec-dot {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f04438;
  animation: pulse 1.2s infinite;
}
.rec-timer {
  font-size: 34px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.rec-question {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ai-soft);
  text-align: center;
}
.rec-question span {
  font-size: 12px;
  color: var(--ai-strong);
}
.rec-question strong {
  font-size: 17px;
  line-height: 1.5;
}
.rec-controls {
  display: flex;
  gap: 10px;
}
.dialog-actions:has(.rec-hint) {
  justify-content: space-between;
  align-items: center;
}
.rec-hint {
  font-size: 12px;
}
.transcribe,
.rec-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  text-align: center;
}
.rec-done > .icon {
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  stroke-width: 2.4;
}

/* 通用生成动画 */
.gen-orbit {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 80%, transparent 81%),
    conic-gradient(var(--brand), var(--ai) calc(var(--p, 0) * 1%), #eceef4 0);
  color: var(--ai);
}
.gen-orbit .icon {
  width: 26px;
  height: 26px;
  animation: spin 2.4s linear infinite;
}
.gen-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 240px;
}
.gen-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.gen-steps li .icon {
  width: 16px;
  height: 16px;
}
.gen-steps li.done {
  color: #067647;
}
.gen-steps li.now {
  color: var(--ink);
  font-weight: 600;
}
.spin {
  width: 16px;
  height: 16px;
  border: 2px solid var(--ai-soft);
  border-top-color: var(--ai);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.transcribe .progress,
.gen-body .progress {
  width: min(360px, 100%);
}
.transcribe .progress-bar,
.gen-body .progress-bar {
  background: var(--ai-gradient);
}
.gen-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 420px;
  justify-content: center;
}
.gen-panel h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gen-panel h2 .icon {
  color: var(--ai);
}
.gen-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

/* ---------- 阶段 1：短视频 ---------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.template-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.template-card:hover {
  border-color: var(--brand-line);
}
.template-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.template-cover {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  margin-bottom: 6px;
  overflow: hidden;
}
.template-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.template-cover em {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(8, 12, 32, 0.7);
  color: #fff;
  font-size: 11px;
  font-style: normal;
}
.template-card strong,
.template-card small,
.template-goal {
  margin: 0 12px;
}
.template-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.template-goal {
  align-self: flex-start;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pop-soft);
  color: var(--pop-strong);
  font-size: 11px;
  font-weight: 600;
}
.template-structure {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ai-soft);
  font-size: 13px;
  color: var(--muted);
}
.template-structure .icon {
  color: var(--ai);
  flex: none;
}
.template-structure strong {
  display: block;
  color: var(--ink);
}
.pick-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 14px;
}
.pick-mode,
.folder-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.pick-mode .icon,
.folder-card .icon {
  margin-bottom: 6px;
  color: var(--brand);
}
.pick-mode:first-child .icon {
  color: var(--ai);
}
.pick-mode small,
.folder-card small {
  color: var(--muted);
  font-size: 12px;
}
.pick-mode.selected,
.folder-card.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.pick-ai {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ai-soft);
  font-size: 13px;
}
.pick-ai .icon {
  color: var(--ai);
  flex: none;
}
.folder-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.polish {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.polish .btn .icon {
  color: var(--ai);
}
@media (max-width: 1100px) {
  .kb-entries {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kb-voice {
    grid-column: 1/-1;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .kb-entries,
  .pick-modes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 桌面客户端最小宽度 1100：侧栏栏位保持在右侧，只在更窄时堆叠 */
@media (max-width: 1100px) and (min-width: 901px) {
  .studio-grid,
  .knowledge-grid,
  .script-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .creator-panel {
    order: 0;
    text-align: center;
  }
  .portrait-large {
    margin: 0 auto 12px;
  }
  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .order-summary {
    position: sticky;
  }
}

/* ================= 通用：加载 / 状态 / 动效 ================= */
.btn-spin {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-spin.dark {
  border-color: var(--brand-line);
  border-top-color: var(--brand);
}
.btn.is-busy {
  opacity: 1;
  pointer-events: none;
}
.btn.secondary .btn-spin,
.btn.ghost .btn-spin {
  border-color: #d6d9e3;
  border-top-color: var(--brand);
}
.btn.danger-solid {
  background: var(--bad);
  color: #fff;
}
.btn.danger-solid:hover {
  background: #c9333a;
}
.sk {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eceef4 25%, #f6f7fa 37%, #eceef4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -135% 0;
  }
}
.sk-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
}
.sk-page {
  display: grid;
  gap: 20px;
}
.sk-head {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}
.sk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
}
.sk-card {
  display: grid;
  gap: 14px;
  align-content: start;
}
.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sk-row.pad {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.main.enter > * {
  animation: rise 0.36s var(--ease) both;
}
.main.enter > *:nth-child(2) {
  animation-delay: 0.05s;
}
.main.enter > *:nth-child(3) {
  animation-delay: 0.1s;
}
.main.enter > *:nth-child(n + 4) {
  animation-delay: 0.14s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast .icon {
  width: 17px;
  height: 17px;
  padding: 2px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  stroke-width: 2.6;
}
.toast.error .icon {
  background: var(--bad);
}
.toast.info .icon {
  background: var(--ai);
}
.inline-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.inline-alert .icon {
  flex: none;
  width: 16px;
  height: 16px;
}
.inline-alert.error {
  background: #fff1f1;
  color: #b42318;
}
.inline-alert.warn {
  background: #fff8eb;
  color: #93370d;
}
.confirm-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.confirm-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff4e5;
  color: var(--warn);
}
.mini-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.mini-empty strong {
  color: var(--ink);
  font-size: 14px;
}
.mini-empty > .icon {
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover {
  color: var(--ink);
  border-color: #cfd3de;
}
.icon-btn.busy {
  color: var(--brand);
  border-color: var(--brand-line);
}
.icon-btn .count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid var(--bg);
}
.icon-btn .count.dot {
  background: var(--pop);
}
.pop-wrap {
  position: relative;
}
.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: 300px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.18);
  animation: pop 0.18s var(--ease);
}
.popover.wide {
  width: 340px;
}
.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px;
}
.pop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.pop-empty strong {
  color: var(--ink);
  font-size: 13px;
}
.pop-empty .icon {
  width: 26px;
  height: 26px;
  padding: 6px;
  border-radius: 50%;
  background: #f0f2f7;
}
.task-row,
.notice {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.task-row:hover,
.notice:hover {
  background: #f7f8fb;
}
.task-row > .icon {
  width: 32px;
  height: 32px;
  flex: none;
  padding: 8px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}
.task-row.warn > .icon {
  background: #fff4e5;
  color: var(--warn);
}
.task-row > span,
.notice > span:last-child {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.task-row small,
.notice small {
  color: var(--muted);
  font-size: 12px;
}
.task-row .progress {
  height: 4px;
  margin-top: 3px;
}
.notice-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f0f2f7;
  color: var(--muted);
}
.notice.lead .notice-icon {
  background: var(--pop-soft);
  color: var(--pop-strong);
}
.notice.video .notice-icon,
.notice.agent .notice-icon {
  background: var(--ai-soft);
  color: var(--ai-strong);
}
.notice.chat .notice-icon {
  background: #e7f8ef;
  color: #067647;
}
.notice.warn .notice-icon {
  background: #fff4e5;
  color: var(--warn);
}
.notice em {
  font-size: 11px;
  color: #98a0b2;
  font-style: normal;
}
.notice.unread {
  background: #f7f9ff;
}
.notice.unread strong::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--pop);
  vertical-align: middle;
}
.notice-list {
  max-height: 340px;
  overflow-y: auto;
}
.update-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.update-card img {
  width: 48px;
  height: 48px;
}
.update-card div {
  display: flex;
  flex-direction: column;
}
.update-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

/* ================= 智能获客 ================= */
.acq-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}
.plat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.plat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 550;
}
.plat i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
.plat.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.plat.soon {
  opacity: 0.55;
}
.plat em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.type {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.type small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.type.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.target-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
  font-size: 13px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #eceef4;
  gap: 2px;
}
.seg button,
.seg .btn {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.seg button.active,
.seg .btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.seg.small button {
  height: 28px;
  font-size: 12px;
}
.acq-start-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.acq-accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.account-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.account-row small {
  color: var(--muted);
  font-size: 12px;
}
.account-row.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.acq-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.acq-note .icon {
  width: 14px;
  height: 14px;
}
.run-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 14px;
}
.run-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.run-stats span {
  font-size: 12px;
  color: var(--muted);
}
.run-stats strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.run-stats .big {
  font-size: 34px;
  line-height: 1.1;
  color: var(--pop-strong);
  letter-spacing: -0.02em;
}
.run-stats .big small {
  font-size: 14px;
  color: var(--muted);
}
.progress.live .progress-bar {
  background-image: linear-gradient(90deg, var(--brand), var(--ai), var(--brand));
  background-size: 200% 100%;
  animation: flow 2s linear infinite;
}
@keyframes flow {
  to {
    background-position: -200% 0;
  }
}
.chrome-hint,
.acq-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7f8fb;
  font-size: 13px;
}
.chrome-hint {
  align-items: center;
}
.chrome-hint > .icon,
.acq-alert > .icon {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--brand);
}
.chrome-hint span {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chrome-hint small,
.acq-alert p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.acq-alert div {
  flex: 1;
}
.acq-alert .row-actions {
  margin-top: 10px;
}
.acq-alert.warn {
  background: #fff8eb;
  border: 1px solid #ffe2ad;
}
.acq-alert.warn > .icon {
  color: var(--warn);
}
.acq-alert.err {
  background: #fff1f1;
  border: 1px solid #ffd6d6;
}
.acq-alert.err > .icon {
  color: var(--bad);
}
.acq-alert.ok {
  background: linear-gradient(135deg, #fff, var(--pop-soft));
  border: 1px solid #ffd9c8;
}
.acq-alert.ok > .icon {
  color: var(--ok);
}
.run-log {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ok);
}
.live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.4s infinite;
}
.run-log ol {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 190px;
  overflow-y: auto;
}
.run-log li {
  display: flex;
  gap: 12px;
  padding: 5px 14px;
  font-size: 12.5px;
  animation: rise 0.3s var(--ease) both;
}
.run-log time {
  color: #98a0b2;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.run-log li.ok span {
  color: #067647;
}
.run-log li.warn span {
  color: #b54708;
}
.run-log li.muted span {
  color: var(--muted);
}
.run-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.intent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #cfd4df;
}
.intent em {
  margin-left: 4px;
  font-style: normal;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--muted);
}
.intent.i3 {
  color: var(--pop);
}
.intent.i3 em {
  color: var(--pop-strong);
  font-weight: 600;
}
.intent.i2 {
  color: var(--warn);
}
tr.fresh td {
  animation: flash 1.4s var(--ease);
}
@keyframes flash {
  from {
    background: var(--pop-soft);
  }
}
.badge .btn-spin {
  width: 11px;
  height: 11px;
  border-width: 1.6px;
}
.outreach-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  background: var(--brand-soft);
}
.outreach-bar > div:first-of-type {
  display: flex;
  flex-direction: column;
}
.outreach-bar small {
  color: var(--muted);
  font-size: 12px;
}
.outreach-bar .progress {
  flex: 1;
  min-width: 140px;
}
.outreach-bar.done {
  background: #e7f8ef;
  border-color: #b7e6cc;
}
.outreach-bar > .icon {
  color: #067647;
}
.outreach-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.outreach-facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f8fb;
  font-size: 13px;
}
.outreach-facts span {
  font-size: 12px;
  color: var(--muted);
}
.outreach-facts .warn {
  background: #fff8eb;
}
.lead-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 4px;
}
.letter-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}
.lead-card h3 {
  font-size: 17px;
  line-height: 1.5;
}
.history-list {
  display: grid;
  gap: 8px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}
.history-row div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.history-row small {
  color: var(--muted);
  font-size: 12px;
}
.plat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.auth-flow {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.auth-flow li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}
.auth-flow li::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: var(--line);
}
.auth-flow li:last-child::after {
  display: none;
}
.auth-flow span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eceef4;
  font-size: 12px;
  z-index: 1;
}
.auth-flow .now span {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.auth-flow .now {
  color: var(--ink);
  font-weight: 600;
}
.auth-flow .done span {
  background: var(--ok);
  color: #fff;
}
.auth-flow .done .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.auth-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 250px;
  justify-content: center;
  text-align: center;
}
.qr.small {
  width: 150px;
  height: 150px;
  padding: 8px;
}

/* ================= 地图获客 ================= */
.map-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.map-bar .field.grow {
  flex: 1;
  min-width: 220px;
}
.map-bar .btn {
  height: 42px;
}
.circle-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--ai-soft);
  color: var(--ai-strong);
  font-size: 13px;
}
.seg.mode .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
}
.seg.mode .btn.active {
  background: var(--surface);
}
.map-layout {
  grid-template-columns: 340px minmax(0, 1fr);
}
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  position: sticky;
  top: 0;
  z-index: 2;
}
.merchant-no {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 650;
}
.merchant.selected .merchant-no {
  background: var(--pop);
  color: #fff;
}
.map-canvas.drawing {
  cursor: crosshair;
}
.map-canvas.drawing::after {
  content: "按住鼠标拖动画圈";
  position: absolute;
  left: 50%;
  top: 16px;
  translate: -50% 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.82);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  animation: pulse 2s infinite;
}
.cluster {
  position: absolute;
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(51, 85, 255, 0.35);
  transition: scale 0.2s var(--ease);
  animation: rise 0.4s var(--ease) both;
}
.cluster:hover {
  scale: 1.08;
}
.cluster strong {
  font-size: 13px;
}
.cluster span {
  font-size: 11px;
  opacity: 0.85;
}
.draw-circle {
  position: absolute;
  translate: -50% -50%;
  width: calc(var(--r) * 2%);
  aspect-ratio: 1;
  border: 2px dashed var(--ai);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ai) 12%, transparent);
  pointer-events: none;
}
.draw-circle.done {
  border-style: solid;
  background: color-mix(in srgb, var(--ai) 9%, transparent);
  animation: ping 0.5s var(--ease);
}
@keyframes ping {
  from {
    scale: 0.94;
    opacity: 0.4;
  }
}
.draw-circle .radius {
  position: absolute;
  left: 50%;
  bottom: -11px;
  translate: -50% 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ai);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.map-pin.added {
  background: var(--ok);
}
.map-zoom {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
}
.map-zoom .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
}
.map-zoom .btn + .btn {
  border-top: 1px solid var(--line);
}
.map-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  font-size: 13px;
  color: var(--muted);
}
.map-list .mini-empty.draw .icon {
  background: var(--ai-soft);
  color: var(--ai);
}

/* ================= AI 助手 ================= */
.home-ask {
  margin-bottom: 26px;
}
.ask-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.composer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.composer:focus-within {
  border-color: var(--ai);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ai) 12%, transparent);
}
.composer-icon {
  display: grid;
  place-items: center;
  color: var(--ai);
  flex: none;
}
.composer .input {
  border: 0;
  background: none;
  padding: 0;
  min-height: 34px;
  box-shadow: none !important;
}
.composer .send {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
}
.composer kbd {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8fb;
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
}
.agent {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 20px;
  height: calc(100dvh - 130px);
  min-height: 520px;
}
.agent-side,
.agent-main {
  min-height: 0;
}
.agent-thread {
  min-height: 0;
}
.agent-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow-y: auto;
}
.side-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.chat-list,
.sched-list {
  display: grid;
  gap: 6px;
}
.chat-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 4px 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.chat-item .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.chat-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item small {
  grid-column: 2;
  font-size: 11px;
  color: var(--muted);
}
.chat-item:hover {
  background: #f7f8fb;
}
.chat-item.active {
  background: var(--ai-soft);
  color: var(--ai-strong);
}
.sched-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
}
.sched-card > .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ai);
}
.sched-card span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sched-card small {
  color: var(--muted);
  font-size: 11px;
}
.sched-card.off {
  opacity: 0.55;
}
.switch input {
  position: absolute;
  opacity: 0;
}
.switch i {
  display: block;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #d3d7e0;
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: translate 0.2s var(--ease);
}
.switch input:checked + i {
  background: var(--ok);
}
.switch input:checked + i::after {
  translate: 14px 0;
}
.small-note {
  font-size: 12px;
  line-height: 1.6;
}
.agent-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.agent-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow-y: auto;
  scroll-behavior: smooth;
}
.agent-hello {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(60% 50% at 50% 0%, var(--ai-soft), transparent 70%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.agent-orb {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ai-gradient);
  color: #fff;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--ai) 12%, transparent);
  margin-bottom: 6px;
  animation: breathe 3s ease-in-out infinite;
}
.agent-orb .icon {
  width: 30px;
  height: 30px;
}
@keyframes breathe {
  50% {
    box-shadow: 0 0 0 18px color-mix(in srgb, var(--ai) 6%, transparent);
  }
}
.agent-hello h1 {
  font-size: 26px;
}
.suggest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 10px;
  margin-top: 18px;
}
.suggest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.suggest:hover {
  border-color: var(--ai);
  transform: translateY(-1px);
}
.suggest .icon {
  color: var(--ai);
  flex: none;
}
.msg {
  display: flex;
  gap: 12px;
  animation: rise 0.3s var(--ease) both;
}
.msg.user {
  justify-content: flex-end;
}
.msg.user .bubble {
  max-width: 70%;
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
}
.ai-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ai-gradient);
  color: #fff;
}
.ai-avatar .icon {
  width: 17px;
  height: 17px;
}
.ai-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.tool-trace {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tool-trace span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ai-soft);
  color: var(--ai-strong);
  font-size: 12px;
}
.tool-trace .icon {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}
.tool-trace .spin {
  width: 11px;
  height: 11px;
  border-width: 1.6px;
}
.ai-text {
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.ai-text.streaming::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 2px;
  background: var(--ai);
  vertical-align: -2px;
  animation: caret 0.9s steps(2) infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.typing {
  display: flex;
  gap: 5px;
  padding: 6px 0;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ai);
  opacity: 0.4;
  animation: blink 1.1s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.16s;
}
.typing i:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes blink {
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
.cite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f0f2f7;
  color: var(--muted);
  font-size: 12px;
}
.cite .icon {
  width: 14px;
  height: 14px;
}
.ai-card {
  animation: rise 0.3s var(--ease) both;
}
.agent-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
}
.agent-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.report {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}
.report h4 {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpis div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.kpis span {
  font-size: 12px;
  color: var(--muted);
}
.kpis strong {
  font-size: 26px;
  letter-spacing: -0.02em;
}
.kpis .up {
  font-style: normal;
  font-size: 12px;
  color: var(--pop-strong);
  font-weight: 600;
}
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 130px;
}
.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.bar span {
  position: relative;
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--brand-line);
  height: var(--h);
  animation: grow 0.5s var(--ease) both;
  transform-origin: bottom;
}
.bar.hl span {
  background: linear-gradient(180deg, var(--pop), var(--pop-strong));
}
.bar em {
  position: absolute;
  top: -17px;
  left: 50%;
  translate: -50% 0;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.bar.hl em {
  color: var(--pop-strong);
  font-weight: 700;
}
.bar small {
  font-size: 11px;
  color: var(--muted);
}
@keyframes grow {
  from {
    transform: scaleY(0);
  }
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.donut {
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  animation: rise 0.4s var(--ease) both;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fbfcfe;
}
.donut span {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 650;
}
.donut small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.donut-wrap ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.donut-wrap li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.donut-wrap i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.donut-wrap strong {
  margin-left: auto;
  padding-left: 10px;
}
.rank {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.rank li {
  display: grid;
  grid-template-columns: 20px 1fr 90px 34px;
  align-items: center;
  gap: 10px;
}
.rank b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f0f2f7;
  color: var(--muted);
  font-size: 11px;
}
.rank li:first-child b {
  background: var(--pop-soft);
  color: var(--pop-strong);
}
.rank i {
  height: 6px;
  border-radius: 999px;
  background: var(--brand-line);
  width: var(--w);
  animation: grow-x 0.5s var(--ease) both;
  transform-origin: left;
}
@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
}
.rank em {
  font-style: normal;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}
.follow {
  display: grid;
  gap: 8px;
}
.follow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}
.follow-row span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.follow-row small {
  color: var(--muted);
  font-size: 12px;
}
.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.mini-works {
  display: flex;
  gap: 10px;
}
.mini-work {
  width: 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.mini-work img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.mini-work span {
  display: block;
  padding: 7px 9px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-saved,
.vf-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.kb-saved > .icon,
.vf-progress > .icon {
  color: var(--ai);
  flex: none;
}
.kb-saved span,
.vf-progress span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.kb-saved small,
.vf-progress small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-chips .chip:hover {
  border-color: var(--ai);
  color: var(--ai-strong);
}
.vf-confirm {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
}
.vf-confirm > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.vf-confirm > div span {
  color: var(--muted);
}
.vf-confirm .row-actions {
  margin-top: 6px;
  justify-content: flex-end;
}
.cmd .input {
  border: 0;
  box-shadow: none !important;
  font-size: 15px;
}
.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}
.cmd-list {
  display: grid;
  gap: 2px;
  padding-top: 8px;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.cmd-item:hover {
  background: var(--ai-soft);
  color: var(--ai-strong);
}
.cmd-item .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.cmd-hint kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f8fb;
  font-size: 11px;
  font-family: inherit;
}

@media (max-width: 1100px) {
  .acq-top,
  .sk-grid,
  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .agent {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .suggest-grid {
    grid-template-columns: repeat(2, minmax(0, 220px));
  }
}
@media (max-width: 900px) {
  .agent {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .agent-side {
    order: 1;
  }
  .agent-thread {
    height: 60dvh;
  }
  .type-tabs,
  .outreach-facts,
  .kpis,
  .run-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .suggest-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.seg.mode {
  background: #e4e7ef;
}
.seg.mode .btn:not(.active) {
  background: #eceef4;
}
.seg.mode .btn:not(.active):hover {
  color: var(--ink);
}
.main.route-agent {
  padding-top: 8px;
  padding-bottom: 24px;
}

/* ================= 空状态 ================= */
.empty {
  background: var(--surface);
  border-style: dashed;
  gap: 8px;
}
.empty h3 {
  color: var(--ink);
  font-size: 16px;
  margin-top: 4px;
}
.empty p {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.7;
}
.empty .btn {
  margin-top: 8px;
}
.empty-art {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-soft), var(--ai-soft));
  color: var(--brand);
}
.empty-art::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pop);
  box-shadow: 0 0 0 3px var(--bg);
}
.empty .empty-art .icon {
  width: 28px;
  height: 28px;
  color: var(--brand);
}
.grid-span {
  grid-column: 1 / -1;
}
/* 焦点与可点击反馈 */
.btn:focus-visible,
.chip:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.btn.primary:active,
.btn.pop:active {
  transform: translateY(1px) scale(0.99);
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
}
.nav-item {
  position: relative;
  overflow: hidden;
}
.nav-item.active {
  animation: navin 0.3s var(--ease);
}
@keyframes navin {
  from {
    background: transparent;
  }
}
dialog[open] .dialog-body > * {
  animation: rise 0.28s var(--ease) both;
}
.render-panel.failed {
  border-color: #ffd6d6;
  background: linear-gradient(180deg, #fff, #fff6f6);
}
.fail-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1f1;
  color: var(--bad);
  box-shadow: 0 0 0 10px rgba(229, 72, 77, 0.06);
  margin-bottom: 6px;
}
.fail-icon .icon {
  width: 32px;
  height: 32px;
}
.refund {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e7f8ef;
  color: #067647;
  font-size: 13px;
}
.refund .icon {
  width: 14px;
  height: 14px;
}
.kpis .down {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
@media (max-width: 1100px) and (min-width: 901px) {
  .acq-top {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}
