:root {
  --bg: #07111f;
  --panel: rgba(12, 24, 42, 0.78);
  --panel-strong: rgba(15, 32, 56, 0.92);
  --ink: #ecf7ff;
  --muted: #8fa8bd;
  --line: rgba(126, 226, 255, 0.22);
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #f59e0b;
  --red: #fb4d6d;
  --charcoal: #d8eeff;
  --soft-blue: rgba(59, 130, 246, 0.16);
  --soft-cyan: rgba(34, 211, 238, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --glow: 0 0 22px rgba(34, 211, 238, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: transparent;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(15, 32, 56, 0.96), rgba(6, 16, 29, 0.96)),
    linear-gradient(90deg, rgba(34, 211, 238, 0.12), transparent);
  color: #eef5ff;
  border-right: 1px solid rgba(126, 226, 255, 0.18);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.95)),
    #22d3ee;
  color: #06101d;
  font-weight: 800;
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.5);
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #a7b4c4;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b7c9da;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.08));
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: inset 3px 0 0 #22d3ee, 0 0 24px rgba(34, 211, 238, 0.08);
}

.sub-nav-container {
  margin-top: -4px;
  margin-bottom: 8px;
}

.sub-nav-divider {
  height: 1px;
  background: rgba(126, 226, 255, 0.15);
  margin: 8px 12px;
}

.sub-nav {
  display: grid;
  gap: 6px;
  padding: 0 8px;
}

.sub-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #a7b9cc;
  background: rgba(255, 255, 255, 0.015);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  justify-content: space-between;
}

.sub-nav-item:hover {
  color: #d8eeff;
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.18);
}

.sub-nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.06));
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: inset 2px 0 0 #22d3ee;
}

.sub-nav-item-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sub-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: #8fa8bd;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sub-nav-close:hover {
  color: #ffffff;
  background: rgba(251, 77, 109, 0.3);
}

.sub-nav-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #67e8f9;
  font-size: 18px;
  transition: all 0.3s ease;
  animation: pulse-glow 2s ease-in-out infinite;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  animation: rotate-icon 3s linear infinite, pulse-glow 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.8));
}

.sub-nav-icon {
  font-size: 14px;
  color: #67e8f9;
  transition: all 0.3s ease;
  animation: pulse-glow 2s ease-in-out infinite;
}

.sub-nav-item:hover .sub-nav-icon,
.sub-nav-item.active .sub-nav-icon {
  animation: rotate-icon 3s linear infinite, pulse-glow 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes rotate-icon {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.sidebar-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 226, 255, 0.15);
  border-radius: 8px;
  color: #a7b4c4;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-bottom: 4px;
}
.sidebar-back-link:hover {
  color: #eef5ff;
  border-color: rgba(126, 226, 255, 0.35);
  background: rgba(126, 226, 255, 0.06);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.08);
}
.sidebar-back-link svg {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.sidebar-back-link:hover svg {
  transform: translateX(-3px);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer span {
  color: #a7b4c4;
  font-size: 12px;
}

.sidebar-footer strong {
  margin-top: 6px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 24px;
  position: relative;
}

.topbar,
.panel-header,
.section-title,
.top-actions,
.recording-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1,
.panel-header h2,
.section-title h3 {
  margin: 0;
}

.topbar h1 {
  font-size: 28px;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(34, 211, 238, 0.2);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.top-actions {
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.primary-btn {
  padding: 0 16px;
  color: #04111d;
  background: linear-gradient(135deg, #67e8f9, #3b82f6);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
  font-weight: 700;
}

.danger-btn {
  padding: 0 16px;
  color: white;
  background: linear-gradient(135deg, #fb4d6d, #f97316);
  box-shadow: 0 0 24px rgba(251, 77, 109, 0.22);
}

.ghost-btn {
  padding: 0 14px;
  color: #d8eeff;
  background: rgba(15, 32, 56, 0.72);
  border-color: var(--line);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  color: #d8eeff;
  background: rgba(15, 32, 56, 0.78);
  border-color: var(--line);
}

/* 字体大小控制 */
.font-size-control {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(15, 32, 56, 0.72);
  border: 1px solid var(--line);
  user-select: none;
}

.font-size-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: #a7b9cc;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.font-size-btn:hover {
  color: #d8eeff;
  background: rgba(34, 211, 238, 0.08);
}

.font-size-value {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 28px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

body.context-hidden .metrics-row,
body.context-hidden .assistant-panel {
  display: none;
}

body.context-hidden #generateReportBtn {
  display: none;
}

body.context-hidden .workspace {
  grid-template-columns: 1fr;
}

.metric,
.work-panel,
.assistant-panel,
.outline-card,
.summary-card,
.recording,
.transcript,
.full-transcript,
.report-block,
.persona-card,
.matrix-card,
.strategy-card,
.knowledge-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 114px;
  padding: 16px;
}

.metric::before,
.work-panel::before,
.assistant-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 24%, transparent 72%, rgba(59, 130, 246, 0.12));
  opacity: 0.75;
}

.metric::after {
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.9), transparent);
}

.metric span,
.metric small,
.suggestion-box span,
.emotion-card span,
.timer-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  color: #ffffff;
}

.metric small {
  display: block;
  margin-top: 8px;
}

.meter,
.emotion-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.meter {
  margin-top: 12px;
}

.meter i,
.emotion-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.work-panel {
  position: relative;
  overflow: hidden;
  display: none;
  min-height: 620px;
  padding: 20px;
}

.work-panel > *,
.assistant-panel > *,
.metric > * {
  position: relative;
  z-index: 1;
}

.work-panel.active {
  display: block;
}

.panel-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-header h2 {
  font-size: 22px;
}

.summary-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.42);
}

.summary-count strong {
  color: #67e8f9;
  font-size: 28px;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.summary-count span {
  color: var(--muted);
  font-size: 13px;
}

.summary-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.summary-filters label {
  display: grid;
  gap: 7px;
}

.summary-filters span {
  color: var(--muted);
  font-size: 13px;
}

.summary-filters select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(3, 10, 22, 0.58);
}

.summary-filters select:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.summary-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.summary-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 226, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.28);
}

.summary-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.14);
}

.summary-group-title h3 {
  margin: 0;
  font-size: 16px;
}

.summary-group-title span {
  color: var(--muted);
  font-size: 13px;
}

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

.summary-card {
  position: relative;
  min-height: 184px;
  padding: 15px;
  text-align: left;
  color: var(--ink);
  overflow: visible;
  cursor: pointer;
}

.segment.hidden,
.stage.locked,
.start-session-banner.hidden {
  display: none;
}

.summary-card:hover {
  border-color: rgba(103, 232, 249, 0.6);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.22), var(--shadow);
  transform: translateY(-2px);
}

.summary-card-top,
.summary-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.session-no {
  color: #67e8f9;
  font-weight: 800;
}

.session-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
  font-size: 12px;
}

.session-status.running {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.2);
}

.session-status.pending {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
}

.summary-card h4 {
  margin: 14px 0 8px;
  font-size: 17px;
}

.summary-card p {
  margin: 0;
  color: #aec3d5;
  line-height: 1.5;
}

.summary-card-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.session-hover {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100% - 6px);
  z-index: 20;
  display: none;
  padding: 12px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 22px rgba(34, 211, 238, 0.18);
}

.summary-card:hover .session-hover {
  display: grid;
  gap: 8px;
}

.session-hover dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 7px 10px;
  margin: 0;
}

.session-hover dt {
  color: var(--muted);
  font-size: 12px;
}

.session-hover dd {
  margin: 0;
  color: #ecf7ff;
  font-size: 12px;
  line-height: 1.45;
}

.session-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(126, 226, 255, 0.1);
}

.session-user-avatars {
  display: flex;
  align-items: center;
}

.session-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border: 2px solid rgba(12, 24, 42, 0.9);
}

.session-user-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(126, 226, 255, 0.12);
  border: 2px solid rgba(12, 24, 42, 0.9);
  margin-left: -8px;
}

.session-user-count {
  font-size: 11px;
  color: var(--cyan);
  font-weight: 500;
}

.session-user-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-user-item {
  padding: 3px 0;
  border-bottom: 1px solid rgba(126, 226, 255, 0.06);
  font-size: 11px;
  line-height: 1.4;
}

.session-user-item:last-child {
  border-bottom: none;
}

.segmented {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.42);
}

.segment {
  min-width: 72px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segment.active {
  color: #04111d;
  background: linear-gradient(135deg, #67e8f9, #93c5fd);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
}

.stage {
  display: none;
}

.stage.active {
  display: grid;
  gap: 16px;
}

.start-session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(103, 232, 249, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.1)),
    rgba(3, 10, 22, 0.58);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.14);
}

.start-session-banner h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.start-session-banner span {
  color: #aec3d5;
  line-height: 1.55;
}

.start-session-banner .primary-btn {
  min-width: 132px;
}

.start-session-banner .primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* 横幅按钮组 */
.banner-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 锁定/解锁按钮 */
.lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 132px;
  padding: 9px 20px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.lock-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.12);
}

.lock-btn.locked {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
}

.lock-btn.locked:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.14);
}

/* 密码展示 */
.lock-password-display {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px dashed rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lock-password-display.hidden {
  display: none;
}

.lock-password-label {
  color: #67e8f9;
  font-size: 13px;
  white-space: nowrap;
}

.lock-password-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 6px;
  user-select: all;
}

/* 密码输入框 */
.password-input {
  width: 100%;
  max-width: 240px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.46);
  color: var(--ink);
  font-size: 20px;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.password-input:focus {
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

/* 解锁错误提示 */
.unlock-error {
  color: #fb4d6d;
  font-size: 13px;
  margin-top: 8px;
}

.unlock-error.hidden {
  display: none;
}

/* 表单锁定状态 */
.brief-form.locked label {
  pointer-events: none;
}

.brief-form.locked input,
.brief-form.locked textarea {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(3, 10, 22, 0.28);
}

.brief-form.locked button[type="submit"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* 提纲卡片锁定 */
.outline-card.locked {
  opacity: 0.55;
  pointer-events: none;
}

/* 用户管理按钮锁定 */
.audience-section.locked .section-title button {
  opacity: 0.4;
  pointer-events: none;
}

.brief-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.brief-form label {
  display: grid;
  gap: 8px;
}

.brief-form label:first-child {
  grid-column: 1 / -1;
}

.brief-form span {
  color: var(--muted);
  font-size: 13px;
}

.brief-form input,
.brief-form textarea,
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.46);
  color: var(--ink);
}

.brief-form input:focus,
.brief-form textarea:focus,
.search:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.brief-form input {
  min-height: 42px;
  padding: 0 12px;
}

.brief-form textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.brief-form button {
  width: fit-content;
}

.outline-card {
  padding: 18px;
}

.section-title {
  justify-content: space-between;
  gap: 12px;
}

.outline-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 22px;
}

.outline-list li {
  padding: 12px;
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.72);
  border: 1px solid rgba(126, 226, 255, 0.12);
  line-height: 1.55;
}

.live-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}

.recording,
.transcript,
.full-transcript {
  padding: 16px;
}

.video-feed {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 280px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), transparent),
    radial-gradient(circle at 50% 12%, rgba(59, 130, 246, 0.26), transparent 46%),
    #050b16;
  border: 1px solid rgba(103, 232, 249, 0.22);
  box-shadow: inset 0 0 70px rgba(34, 211, 238, 0.08);
  overflow: hidden;
}

.uploaded-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.video-feed.has-upload .uploaded-video {
  display: block;
}

.video-feed.has-upload .face {
  display: none;
}

/* ===== 摄像头实时预览 ===== */
.camera-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
  transform: scaleX(-1); /* 镜像翻转，与镜子一致 */
}

.video-feed.has-camera .camera-preview {
  display: block;
}

.video-feed.has-camera .face {
  display: none;
}

.video-feed.has-camera .wave {
  display: flex;
}

.video-feed.has-camera .wave span {
  animation: waveLive 0.6s ease-in-out infinite;
}

.video-feed.has-camera .wave span:nth-child(1) { animation-delay: 0s; }
.video-feed.has-camera .wave span:nth-child(2) { animation-delay: 0.12s; }
.video-feed.has-camera .wave span:nth-child(3) { animation-delay: 0.24s; }
.video-feed.has-camera .wave span:nth-child(4) { animation-delay: 0.36s; }
.video-feed.has-camera .wave span:nth-child(5) { animation-delay: 0.48s; }

/* 活体音波动画 */
.wave span {
  display: block;
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: rgba(34, 211, 238, 0.55);
  animation: waveIdle 1.6s ease-in-out infinite;
}

.wave span:nth-child(1) { animation-delay: 0s; height: 14px; }
.wave span:nth-child(2) { animation-delay: 0.2s; height: 22px; }
.wave span:nth-child(3) { animation-delay: 0.4s; height: 32px; }
.wave span:nth-child(4) { animation-delay: 0.6s; height: 22px; }
.wave span:nth-child(5) { animation-delay: 0.8s; height: 14px; }

@keyframes waveIdle {
  0%, 100% { opacity: 0.4; transform: scaleY(0.5); }
  50% { opacity: 0.9; transform: scaleY(1.0); }
}

@keyframes waveLive {
  0%, 100% { opacity: 0.3; transform: scaleY(0.3); }
  50% { opacity: 1; transform: scaleY(1.3); }
}

/* ===== 摄像头控制栏 ===== */
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.06);
}

.camera-select-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #67e8f9;
  font-size: 13px;
}

.camera-select-label select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(5, 11, 22, 0.8);
  color: #c7d7e5;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  max-width: 180px;
}

.camera-select-label select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.12);
}

#stopCameraBtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 5px 14px;
  border: 1px solid rgba(251, 77, 109, 0.35);
  color: #fca5a5;
}

#stopCameraBtn:hover {
  background: rgba(251, 77, 109, 0.14);
  border-color: rgba(251, 77, 109, 0.55);
}

#startCameraBtn {
  font-size: 13px;
  padding: 8px 18px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

#startCameraBtn:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}

.video-feed::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background:
    linear-gradient(transparent 0 48%, rgba(103, 232, 249, 0.22) 49%, transparent 52%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 10px);
  animation: scan 3.2s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

.face {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.08);
}

.user-a {
  background: linear-gradient(160deg, #0f766e, #22c55e);
}

.moderator {
  background: linear-gradient(160deg, #1d4ed8, #06b6d4);
}

.wave {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: end;
  gap: 5px;
  height: 38px;
}

.capture-badge {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 18px;
  padding: 7px 10px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(3, 10, 22, 0.62);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.16);
  font-size: 12px;
}

/* 录制指示灯（视频画面上的红色闪烁圆点 + 计时） */
.recording-indicator {
  position: absolute;
  z-index: 4;
  left: 18px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: rec-pulse 1.2s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.75); }
}

.rec-timer {
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.capture-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

/* 录制时 capture-status 变为 4 列（音频/视频/文本/时长） */
.capture-status.recording-active {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-chip {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(126, 226, 255, 0.14);
  border-radius: 8px;
  color: #bdd7ea;
  background: rgba(8, 20, 37, 0.72);
  font-size: 12px;
  text-align: center;
}

.status-chip.active {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(16, 185, 129, 0.14);
}

.upload-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed rgba(103, 232, 249, 0.34);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.38);
}

.upload-box span {
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
}

.upload-box strong {
  color: #9fb7c9;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.upload-box input {
  color: #c7d7e5;
  font-size: 12px;
}

.wave span {
  width: 7px;
  border-radius: 999px;
  background: #67e8f9;
  animation: wave 1s infinite ease-in-out;
}

.wave span:nth-child(1) { height: 16px; }
.wave span:nth-child(2) { height: 30px; animation-delay: 0.1s; }
.wave span:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.wave span:nth-child(4) { height: 34px; animation-delay: 0.3s; }
.wave span:nth-child(5) { height: 18px; animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.65); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.recording-actions {
  gap: 10px;
  margin-top: 14px;
}

/* 录像存储目录选择 */
.storage-dir-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.storage-path {
  font-size: 12px;
  color: #a5f3fc;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(103, 232, 249, 0.2);
}

.transcript-feed {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 336px;
  margin-top: 14px;
  overflow: auto;
  scrollbar-color: rgba(34, 211, 238, 0.5) rgba(8, 20, 37, 0.7);
}

.full-transcript {
  grid-column: 1 / -1;
}

.full-transcript textarea {
  width: 100%;
  min-height: 210px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(126, 226, 255, 0.18);
  border-radius: 8px;
  color: #ecf7ff;
  background: rgba(3, 10, 22, 0.58);
  line-height: 1.7;
  resize: vertical;
}

.full-transcript textarea:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
}

.transcript-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.transcript-tools span {
  color: var(--muted);
  font-size: 13px;
}

.line {
  padding: 12px;
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.74);
  box-shadow: inset 0 0 0 1px rgba(126, 226, 255, 0.1);
}

.line strong {
  display: block;
  margin-bottom: 5px;
  color: var(--charcoal);
  font-size: 13px;
}

.line p {
  margin: 0;
  line-height: 1.55;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  padding: 0 8px;
  border-radius: 999px;
  color: #a5f3fc;
  background: var(--soft-cyan);
  font-size: 12px;
}

.report-grid,
.persona-grid,
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.playback-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 14px;
  margin-top: 14px;
}

.media-player {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(126, 226, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.72);
}

.media-player span {
  color: #67e8f9;
  font-weight: 700;
}

.media-player audio,
.media-player video {
  width: 100%;
}

.media-player video {
  min-height: 180px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.08)),
    #020617;
}

.media-player p {
  margin: 0;
  color: #aec3d5;
  line-height: 1.5;
}

.report-block,
.persona-card,
.matrix-card,
.strategy-card,
.knowledge-item {
  padding: 16px;
}

.report-block h3,
.persona-card h3,
.matrix-card h3,
.strategy-card h3,
.knowledge-item h3 {
  margin: 0 0 10px;
}

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

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.comparison div {
  padding: 14px;
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.72);
  border: 1px solid rgba(126, 226, 255, 0.12);
}

.comparison p,
.persona-card p,
.strategy-card p,
.knowledge-item p,
.timer-card p,
.emotion-card p,
.suggestion-box p {
  margin: 8px 0 0;
  color: #aec3d5;
  line-height: 1.55;
}

.assistant-panel {
  position: sticky;
  overflow: hidden;
  position: sticky;
  top: 20px;
  padding: 18px;
}

.assistant-panel > * + * {
  margin-top: 16px;
}

.question-progress {
  display: grid;
  gap: 9px;
}

.question-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.72);
  border: 1px solid rgba(126, 226, 255, 0.12);
}

.question-item span {
  min-width: 0;
  line-height: 1.35;
}

.pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.done {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

.pending {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
}

.suggestion-box,
.emotion-card,
.timer-card {
  padding: 14px;
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.74);
  border: 1px solid rgba(126, 226, 255, 0.12);
}

.timer-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  color: #67e8f9;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.35);
}

.matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.score {
  display: grid;
  gap: 8px;
}

.score-row {
  display: grid;
  grid-template-columns: 82px 1fr 32px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.search {
  max-width: 320px;
  min-height: 38px;
  padding: 0 12px;
}

.knowledge-list {
  display: grid;
  gap: 12px;
}

.knowledge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.knowledge-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .assistant-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-row,
  .brief-form,
  .live-grid,
  .report-grid,
  .persona-grid,
  .matrix,
  .strategy-grid,
  .comparison,
  .summary-filters,
  .summary-groups,
  .summary-card-grid,
  .playback-grid {
    grid-template-columns: 1fr;
  }

  .capture-status {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .topbar,
  .start-session-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
  }
}

/* ========== 新建调研按钮 & 弹窗 ========== */
.new-session-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.1));
  color: #67e8f9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.new-session-btn:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(59, 130, 246, 0.18));
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
  color: #a5f3fc;
}

/* 弹窗遮罩 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 10, 20, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal-panel {
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(12, 28, 48, 0.96), rgba(7, 18, 33, 0.98));
  box-shadow: 0 0 80px rgba(0, 229, 255, 0.12), 0 24px 80px rgba(0, 0, 0, 0.45);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 0;
}
.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  color: var(--ink);
  margin: 0;
}

.modal-close-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-close-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--ink);
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 22px 26px 26px;
}

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-body label {
  display: grid;
  gap: 6px;
}
.modal-body label span {
  color: var(--muted);
  font-size: 13px;
}
.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(3, 10, 22, 0.58);
  font-size: 14px;
  resize: vertical;
}
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.modal-body textarea {
  min-height: 72px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

.modal-actions .primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #06101d;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
}
.modal-actions .primary-btn:hover {
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
}

.modal-actions .ghost-btn {
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-actions .ghost-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 520px) {
  .form-row.two-col { grid-template-columns: 1fr; }
  .modal-panel { max-height: 94vh; }
}

@media (max-width: 520px) {
  .main {
    padding: 16px;
  }

  .top-actions,
  .recording-actions {
    width: 100%;
  }

  .primary-btn,
  .danger-btn,
  .ghost-btn {
    flex: 1;
  }

  .video-feed {
    grid-template-columns: 1fr;
  }
}

/* 定量调研模块样式 */
.question-item-editor {
  padding: 14px;
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.72);
  border: 1px solid rgba(126, 226, 255, 0.12);
  line-height: 1.55;
  margin-bottom: 10px;
}

.question-item-editor strong {
  color: #67e8f9;
  font-size: 14px;
}

#chartContainer {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  border: 1px dashed rgba(126, 226, 255, 0.2);
  border-radius: 8px;
  margin-top: 14px;
}

/* 用户样本库样式 */
.user-sample-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.user-sample-item {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(126, 226, 255, 0.15);
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.72);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-sample-item:hover {
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
  transform: translateY(-2px);
}

.user-id {
  color: #67e8f9;
  font-weight: 700;
  font-size: 15px;
}

.user-info-preview {
  color: #94a3b8;
  font-size: 12px;
}

.user-hover-detail {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 100;
  display: none;
  min-width: 280px;
  padding: 16px;
  border: 1px solid rgba(103, 232, 249, 0.35);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 22px rgba(34, 211, 238, 0.2);
}

.user-sample-item:hover .user-hover-detail {
  display: block;
}

.user-hover-detail h4 {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 15px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.15);
  padding-bottom: 8px;
}

.user-hover-detail dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.user-hover-detail dt {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.user-hover-detail dd {
  margin: 0;
  color: #ecf7ff;
  font-size: 12px;
  line-height: 1.5;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

/* 调研对象详细表单样式 */
.audience-section {
  grid-column: 1 / -1;
  margin: 8px 0;
}

.audience-section .section-title {
  margin-bottom: 12px;
}

.audience-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(126, 226, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.35);
}

.audience-field {
  display: grid;
  gap: 6px;
}

.audience-field.full-width {
  grid-column: 1 / -1;
}

.audience-field span {
  color: var(--muted);
  font-size: 12px;
}

.audience-field input,
.audience-field select,
.audience-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 10, 22, 0.58);
  color: var(--ink);
  font-size: 13px;
}

.audience-field textarea {
  min-height: 60px;
  padding: 8px 10px;
  resize: vertical;
}

.audience-field input:focus,
.audience-field select:focus,
.audience-field textarea:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.audience-field select {
  cursor: pointer;
}

@media (max-width: 1180px) {
  .audience-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .audience-form-grid {
    grid-template-columns: 1fr;
  }
}

/* 用户头像卡片样式 */
.audience-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(126, 226, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.35);
  min-height: 120px;
}

.audience-avatar-card {
  position: relative;
  width: 90px;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.audience-avatar-card:hover {
  transform: scale(1.05);
}

.avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(126, 226, 255, 0.3);
  background: rgba(3, 10, 22, 0.5);
}

.avatar-label {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.3;
  max-width: 90px;
  word-break: keep-all;
  white-space: normal;
  font-weight: 500;
}

.avatar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(126, 226, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  min-width: 220px;
  max-width: 280px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.audience-avatar-card:hover .avatar-tooltip {
  opacity: 1;
  visibility: visible;
}

.avatar-tooltip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.15);
}

.avatar-tooltip-content {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.avatar-tooltip-content div {
  margin-bottom: 2px;
}

.avatar-tooltip-content strong {
  color: #94a3b8;
}

.add-avatar-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px dashed rgba(126, 226, 255, 0.3);
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.add-avatar-btn:hover {
  border-color: rgba(126, 226, 255, 0.6);
  color: var(--ink);
  background: rgba(126, 226, 255, 0.05);
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-container {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(8, 20, 37, 0.7);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.5);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.7);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-list-item:hover {
  border-color: rgba(126, 226, 255, 0.4);
  background: rgba(3, 10, 22, 0.5);
}

.user-list-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(126, 226, 255, 0.3);
}

.user-list-info {
  flex: 1;
}

.user-list-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.user-list-summary {
  font-size: 12px;
  color: var(--muted);
}

.user-unique-code {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  font-size: 11px;
  color: #f59e0b;
  font-weight: 600;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.user-list-actions {
  display: flex;
  gap: 8px;
}

.user-list-actions button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: all 0.2s;
}

.user-list-actions button:hover {
  border-color: rgba(126, 226, 255, 0.4);
  color: var(--ink);
}

.user-list-actions .delete-btn:hover {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
}

.add-user-btn {
  width: 100%;
  padding: 12px;
  border: 1px dashed rgba(126, 226, 255, 0.3);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-user-btn:hover {
  border-color: rgba(126, 226, 255, 0.6);
  color: var(--ink);
  background: rgba(126, 226, 255, 0.05);
}

.user-edit-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.user-edit-form.hidden {
  display: none;
}

.user-edit-form h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px 0;
}

/* ========== AI 实时分析面板 ========== */
.ai-analysis-panel {
  margin-top: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(12, 28, 48, 0.55), rgba(7, 18, 33, 0.7));
  overflow: hidden;
  transition: border-color 0.3s;
}
.ai-analysis-panel.active {
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.08);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.08);
}

.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 600;
}

.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.3s;
}
.ai-status-dot.listening {
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: rec-pulse 1.2s ease-in-out infinite;
}
.ai-status-dot.analyzing {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: rec-pulse 0.8s ease-in-out infinite;
}
.ai-status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.ai-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-settings-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(126, 226, 255, 0.18);
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-settings-btn:hover {
  border-color: rgba(126, 226, 255, 0.4);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
}

/* Toggle 开关 */
.ai-toggle-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.ai-toggle-track {
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.35);
  position: relative;
  transition: background 0.25s;
}
.ai-toggle-btn.on .ai-toggle-track {
  background: rgba(34, 211, 238, 0.5);
}
.ai-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.25s, background 0.25s;
}
.ai-toggle-btn.on .ai-toggle-thumb {
  transform: translateX(16px);
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

/* API 设置区 */
.ai-settings-body {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.08);
  background: rgba(3, 10, 22, 0.3);
}

.ai-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ai-setting-item {
  display: grid;
  gap: 4px;
}
.ai-setting-item span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
}
.ai-setting-item input,
.ai-setting-item select {
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(126, 226, 255, 0.18);
  border-radius: 6px;
  background: rgba(5, 11, 22, 0.7);
  color: #c7d7e5;
  font-size: 12px;
  outline: none;
}
.ai-setting-item input:focus,
.ai-setting-item select:focus {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.1);
}
.ai-setting-item input::placeholder {
  color: #64748b;
}

.ai-settings-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.ai-settings-footer .ghost-btn {
  font-size: 12px;
  padding: 5px 12px;
}

.ai-test-result {
  font-size: 11px;
  margin-left: auto;
}
.ai-test-result.success { color: #34d399; }
.ai-test-result.error { color: #fca5a5; }

/* AI 分析洞察区 */
.ai-insights {
  padding: 10px 14px 14px;
}

.ai-insight-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.ai-insight-card {
  border: 1px solid rgba(126, 226, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(8, 20, 37, 0.45);
  min-height: 80px;
}

.ai-card-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}
.ai-card-label svg { flex-shrink: 0; }

.ai-card-status {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}
.ai-card-status.active {
  background: rgba(34, 211, 238, 0.18);
  color: #67e8f9;
}
.ai-card-status.recording {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.ai-card-body {
  font-size: 12px;
  color: #c7d7e5;
  line-height: 1.55;
  word-break: break-word;
}

/* 情绪指示器 */
.emotion-indicator {
  display: inline-block;
  font-size: 24px;
  margin-bottom: 4px;
}

.emotion-bars {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 3px 6px;
  align-items: center;
}

.emotion-bar-label {
  font-size: 11px;
  color: #94a3b8;
}

.emotion-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}
.emotion-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
}
#emotionPos { background: linear-gradient(90deg, #22d3ee, #34d399); }
#emotionNeu { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
#emotionNeg { background: linear-gradient(90deg, #f87171, #ef4444); }

/* 表情标签 */
.expression-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  margin-bottom: 4px;
}
.expression-detail {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

/* 说话人切换 */
.speaker-switch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.08);
  background: rgba(8, 20, 37, 0.25);
}

.speaker-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.speaker-toggle-group {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(126, 226, 255, 0.15);
  flex: 1;
}

.speaker-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.speaker-btn:first-child {
  border-right: 1px solid rgba(126, 226, 255, 0.12);
}

.speaker-btn:hover {
  background: rgba(34, 211, 238, 0.06);
  color: #cbd5e1;
}

.speaker-btn.active {
  background: rgba(34, 211, 238, 0.13);
  color: #67e8f9;
}

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

.speaker-dot.user-dot {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.speaker-dot.host-dot {
  background: #60a5fa;
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
}

.speaker-btn.active .user-dot {
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}

.speaker-btn.active .host-dot {
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
}

/* AI 自动识别说话人复选框 */
.speaker-auto-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.speaker-auto-label:hover { color: #94a3b8; }
.speaker-auto-label input[type="checkbox"] {
  accent-color: #22d3ee;
  cursor: pointer;
}
.speaker-auto-label.enabled { color: #67e8f9; }

/* 响应式 */
@media (max-width: 860px) {
  .ai-insight-row {
    grid-template-columns: 1fr;
  }
  .ai-settings-grid {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== 用户详情页样式 ===== */
.user-detail-container {
  padding: 24px;
}

.user-detail-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.user-detail-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.user-detail-avatar {
  display: flex;
  justify-content: center;
  padding: 32px;
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.user-detail-avatar img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(126, 226, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.user-detail-card {
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.user-detail-card h3 {
  margin: 0 0 20px 0;
  font-size: 22px;
  color: var(--ink);
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.user-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-detail-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(126, 226, 255, 0.08);
}

.user-detail-meta > div:last-child {
  border-bottom: none;
}

.user-detail-meta span {
  font-size: 15px;
  color: var(--muted);
}

.user-detail-meta strong {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}

.user-detail-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.user-detail-right .user-detail-section:last-child {
  grid-column: 1 / -1;
}

.user-detail-section {
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.user-detail-section h3 {
  margin: 0 0 18px 0;
  font-size: 17px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.detail-tag {
  flex: 1;
  min-width: 200px;
  background: rgba(126, 226, 255, 0.06);
  border: 1px solid rgba(126, 226, 255, 0.15);
  border-radius: 8px;
  padding: 16px 18px;
}

.detail-tag strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 8px;
}

.detail-tag span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.detail-factors {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-factor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(126, 226, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid rgba(126, 226, 255, 0.3);
}

.factor-label {
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  min-width: 120px;
  flex-shrink: 0;
}

.factor-weight {
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.factor-weight.weight-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.factor-weight.weight-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.factor-weight.weight-low {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.factor-desc {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

/* 调研场次时间线 */
.user-sessions-section {
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.user-sessions-section h3 {
  margin: 0 0 20px 0;
  font-size: 17px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 28px;
}

.session-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(126, 226, 255, 0.15);
}

.session-timeline-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.session-timeline-item:hover {
  background: rgba(126, 226, 255, 0.04);
  border-radius: 8px;
}

.session-timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(126, 226, 255, 0.5);
  border: 3px solid rgba(3, 10, 22, 0.8);
  flex-shrink: 0;
  position: absolute;
  left: -28px;
  top: 22px;
  z-index: 1;
}

.session-timeline-content {
  flex: 1;
  padding: 16px 20px;
  background: rgba(126, 226, 255, 0.04);
  border: 1px solid rgba(126, 226, 255, 0.1);
  border-radius: 8px;
}

.session-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.session-timeline-header strong {
  font-size: 16px;
  color: var(--ink);
}

.session-timeline-type {
  font-size: 13px;
  padding: 3px 12px;
  border-radius: 4px;
  background: rgba(126, 226, 255, 0.1);
  color: var(--ink);
}

.session-timeline-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.session-status {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.session-status.done {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.session-status.ongoing {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.session-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.session-timeline-goal {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.session-timeline-notes {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid rgba(245, 158, 11, 0.3);
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .user-detail-layout {
    grid-template-columns: 320px 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .user-detail-layout {
    grid-template-columns: 1fr;
  }

  .user-detail-right {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .user-detail-right .user-detail-section:last-child {
    grid-column: 1;
  }

  .user-detail-avatar img {
    width: 180px;
    height: 180px;
  }

  .detail-tag {
    min-width: 100%;
  }

  .session-timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ===== 用户洞察页面样式 ===== */
.insight-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.insight-filters label {
  display: grid;
  gap: 5px;
}

.insight-filters label span {
  color: var(--muted);
  font-size: 12px;
}

.insight-filters select {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(3, 10, 22, 0.58);
  font-size: 13px;
}

.insight-filters select:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.insight-filters .ghost-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .insight-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .insight-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 购买力标签 */
.insight-power-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.35);
  flex-wrap: wrap;
}

.power-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.power-tab {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 37, 0.72);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.power-tab:hover {
  border-color: rgba(103, 232, 249, 0.5);
  color: var(--ink);
}

.power-tab.active {
  background: linear-gradient(135deg, #67e8f9, #3b82f6);
  color: #04111d;
  border-color: transparent;
  font-weight: 600;
}

/* 用户洞察矩阵 */
.insight-matrix-container {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.35);
  padding: 16px;
  overflow: auto;
  min-width: 0;
}

.insight-matrix-container.hidden {
  display: none;
}

.insight-matrix-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 1200px;
}

/* 横轴维度标签（人生阶段） */
.matrix-dimension-x {
  margin-left: 112px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(59, 130, 246, 0.04));
  border: 1px solid rgba(126, 226, 255, 0.18);
  color: #7ee2ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 矩阵主体 */
.matrix-body {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

/* 纵轴维度标签（价值观） */
.matrix-dimension-y {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  padding: 10px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(59, 130, 246, 0.04));
  border: 1px solid rgba(126, 226, 255, 0.18);
  color: #7ee2ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* 矩阵内容 */
.matrix-inner {
  flex: 1;
  display: grid;
  gap: 12px;
}

/* 矩阵顶部标题 */
.insight-matrix-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.12);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.insight-matrix-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  border-radius: 2px;
}

.insight-matrix-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: stretch;
}

/* 纵轴标签（价值观） */
.matrix-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(126, 226, 255, 0.25);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  min-height: 100px;
  letter-spacing: 0.05em;
}

.matrix-row-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  gap: 10px;
}

.matrix-cell {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(126, 226, 255, 0.12);
  background: rgba(8, 20, 37, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-cell:hover {
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
}

.matrix-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matrix-cell-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.matrix-cell-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
}

.matrix-cell-percent {
  font-size: 12px;
  color: var(--muted);
}

.matrix-cell-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.matrix-cell-keywords span {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 11px;
}

.matrix-cell-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: auto;
}

.matrix-cell-trend.up {
  color: #34d399;
}

.matrix-cell-trend.down {
  color: #fb4d6d;
}

.matrix-cell-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  min-height: 100px;
  border-radius: 8px;
  border: 1px dashed rgba(126, 226, 255, 0.1);
  background: rgba(8, 20, 37, 0.3);
}

.matrix-x-headers {
  display: grid;
  grid-template-columns: 100px repeat(7, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.15);
}

.matrix-x-header-cell {
  text-align: center;
  padding: 10px 6px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(126, 226, 255, 0.18);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.matrix-x-header-cell:hover {
  border-color: rgba(126, 226, 255, 0.4);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.1));
}



/* 群组详情面板 */
.insight-group-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.35);
  padding: 20px;
}

.insight-group-detail.hidden {
  display: none;
}

.group-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.12);
}

.group-detail-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.group-detail-content {
  display: grid;
  gap: 20px;
}

.group-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.group-stat-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 37, 0.6);
  text-align: center;
}

.group-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.group-stat-card strong {
  display: block;
  font-size: 24px;
  color: var(--cyan);
}

.group-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.group-user-card {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 37, 0.6);
  cursor: pointer;
  transition: all 0.2s;
}

.group-user-card:hover {
  border-color: rgba(103, 232, 249, 0.5);
}

.group-user-card .user-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}

.group-user-card .user-info {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .matrix-row-cells {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .matrix-x-headers {
    grid-template-columns: 100px repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .insight-matrix-row {
    grid-template-columns: 80px 1fr;
  }

  .matrix-row-cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-x-headers {
    grid-template-columns: 80px repeat(2, minmax(0, 1fr));
  }

  .group-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ===== 群组分析样式 ===== */
.group-analysis-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(126, 226, 255, 0.12);
}

.group-analysis-section h3 .section-icon {
  font-size: 18px;
}

/* 分析卡片 */
.analysis-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 20, 37, 0.5);
  margin-bottom: 16px;
  overflow: hidden;
}

.analysis-card-title {
  padding: 12px 16px;
  background: rgba(34, 211, 238, 0.06);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.02em;
}

.analysis-card-body {
  padding: 16px;
}

/* 画像网格 */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.profile-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(8, 20, 37, 0.4);
  border: 1px solid rgba(126, 226, 255, 0.08);
}

.profile-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.profile-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* 预算分析 */
.budget-analysis {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.budget-label {
  color: var(--muted);
}

.budget-value {
  font-weight: 600;
  color: var(--cyan);
  font-size: 15px;
}

.budget-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* 价值维度 */
.value-dimension {
  display: grid;
  gap: 14px;
}

.value-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.value-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
  letter-spacing: 0.03em;
}

.value-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* 优先级标签 */
.priority-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.priority-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
}

.priority-tag.rank-1 {
  background: rgba(251, 77, 109, 0.12);
  color: #fb4d6d;
  border-color: rgba(251, 77, 109, 0.3);
}

.priority-tag.rank-2 {
  background: rgba(255, 165, 0, 0.12);
  color: #ffa500;
  border-color: rgba(255, 165, 0, 0.3);
}

.priority-tag.rank-3 {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.priority-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* 偏好条 */
.preference-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pref-bar-item {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  align-items: center;
  gap: 12px;
}

.pref-label {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.pref-bar {
  height: 10px;
  background: rgba(8, 20, 37, 0.6);
  border-radius: 5px;
  overflow: hidden;
}

.pref-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.6), rgba(59, 130, 246, 0.8));
  border-radius: 5px;
  transition: width 0.5s ease;
}

.pref-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-align: right;
}

/* 风格描述 */
.style-item {
  margin-bottom: 14px;
}

.style-item:last-child {
  margin-bottom: 0;
}

.style-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.style-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.performance-desc,
.space-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* 智能化配置 */
.smart-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.smart-feature-item {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 37, 0.4);
}

.smart-feature-item .sf-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-right: 8px;
}

.smart-feature-item .sf-level {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.smart-feature-item.level-high .sf-level {
  background: rgba(251, 77, 109, 0.12);
  color: #fb4d6d;
}

.smart-feature-item.level-mid .sf-level {
  background: rgba(255, 165, 0, 0.12);
  color: #ffa500;
}

.smart-feature-item.level-low .sf-level {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.smart-feature-item p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0 0 0;
}

/* 舒适配置 */
.comfort-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comfort-tag {
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
  font-size: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* 异质性警告 */
.heterogeneity-alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid;
}

.heterogeneity-alert.alert-high {
  background: rgba(251, 77, 109, 0.06);
  border-color: rgba(251, 77, 109, 0.25);
}

.heterogeneity-alert.alert-medium {
  background: rgba(255, 165, 0, 0.06);
  border-color: rgba(255, 165, 0, 0.25);
}

.heterogeneity-alert.alert-good {
  background: rgba(52, 211, 153, 0.06);
  border-color: rgba(52, 211, 153, 0.25);
}

.alert-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.alert-high .alert-title {
  color: #fb4d6d;
}

.alert-medium .alert-title {
  color: #ffa500;
}

.alert-good .alert-title {
  color: #34d399;
}

.alert-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* 问题列表 */
.issue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.issue-item {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(8, 20, 37, 0.3);
}

.issue-item.issue-high {
  border-left: 3px solid #fb4d6d;
}

.issue-item.issue-medium {
  border-left: 3px solid #ffa500;
}

/* 建议列表 */
.suggestion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-item {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(8, 20, 37, 0.3);
  border-left: 3px solid var(--cyan);
}

.suggestion-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pref-bar-item {
    grid-template-columns: 60px 1fr 40px;
  }

  .smart-features {
    grid-template-columns: 1fr;
  }
}

/* ===== 用户定位样式 ===== */
.positioning-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: fit-content;
  margin: 0 0 20px 0;
}

.positioning-tab {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.positioning-tab:hover {
  color: var(--ink);
}

.positioning-tab.active {
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
  font-weight: 600;
}

.positioning-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.positioning-panel.active {
  display: block;
}

/* 车型配置 */
.config-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.config-model-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-model-select label span {
  color: var(--muted);
  font-size: 12px;
  margin-right: 8px;
}

.config-model-select select {
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 10, 22, 0.58);
  color: var(--ink);
  font-size: 13px;
}

.config-actions {
  display: flex;
  gap: 10px;
}

.vehicle-config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.config-module {
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}

.config-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.config-module-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.config-module-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid rgba(126, 226, 255, 0.1);
  border-radius: 6px;
}

.config-item-label {
  flex-shrink: 0;
  width: 130px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-item-input {
  flex: 1;
  min-width: 0;
}

.config-item-input input,
.config-item-input select {
  width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(3, 10, 22, 0.58);
  color: var(--ink);
  font-size: 13px;
  min-height: 30px;
}

.config-item-input select {
  cursor: pointer;
}

.config-item-input input:focus,
.config-item-input select:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.config-item .remove-item {
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border: none;
  background: transparent;
}

.config-item .remove-item:hover {
  color: #fb4d6d;
}

.add-config-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px dashed rgba(126, 226, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.add-config-item:hover {
  border-color: rgba(126, 226, 255, 0.6);
  color: var(--ink);
}

/* 目标用户群 & 潜在用户群 */
.target-toolbar,
.potential-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.target-model-select,
.potential-model-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.target-model-select label span,
.potential-model-select label span {
  color: var(--muted);
  font-size: 12px;
  margin-right: 8px;
}

.target-model-select select,
.potential-model-select select {
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(3, 10, 22, 0.58);
  color: var(--ink);
  font-size: 13px;
}

.target-users-content,
.potential-users-content {
  min-height: 400px;
}

.target-results,
.potential-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.target-chart,
.potential-chart {
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-height: 200px;
}

.target-analysis,
.potential-analysis {
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.potential-highlight {
  background: rgba(251, 77, 109, 0.08);
  border: 1px solid rgba(251, 77, 109, 0.3);
  border-radius: 10px;
  padding: 16px 20px;
}

.user-group-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.user-group-card:hover {
  border-color: rgba(126, 226, 255, 0.4);
}

.user-group-card.highlight {
  border-color: rgba(251, 77, 109, 0.5);
  background: rgba(251, 77, 109, 0.05);
}

.group-card-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.group-card-info {
  flex: 1;
}

.group-card-info h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.group-card-info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.group-card-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #22d3ee;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 目标用户群汇总面板 ===== */
.target-summary-panel {
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.target-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.target-summary-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.target-summary-badge {
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
  font-size: 12px;
  font-weight: 600;
}

.target-summary-content {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.target-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(3, 10, 22, 0.4);
  border: 1px solid rgba(126, 226, 255, 0.12);
  border-radius: 8px;
  font-size: 13px;
}

.target-summary-item strong {
  color: #22d3ee;
  font-size: 18px;
}

/* ===== 核心目标人群标签 ===== */
.core-target-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.core-target-badge.yes {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.core-target-badge.no {
  background: rgba(251, 77, 109, 0.15);
  color: #fb4d6d;
}

/* ===== 群组用户列表弹窗 ===== */
.group-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.group-users-list::-webkit-scrollbar {
  width: 6px;
}

.group-users-list::-webkit-scrollbar-track {
  background: rgba(8, 20, 37, 0.5);
  border-radius: 3px;
}

.group-users-list::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.5);
  border-radius: 3px;
}

.group-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(3, 10, 22, 0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.group-user-item:hover {
  border-color: rgba(126, 226, 255, 0.4);
  background: rgba(3, 10, 22, 0.5);
}

.group-user-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(126, 226, 255, 0.2);
}

.group-user-item .user-info {
  flex: 1;
}

.group-user-item .user-info .user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.group-user-item .user-info .user-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.group-user-item .user-score {
  font-size: 14px;
  font-weight: 700;
  color: #22d3ee;
}

/* ===== 用户群组卡片点击效果 ===== */
.user-group-card.clickable {
  cursor: pointer;
}

.user-group-card.clickable:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
