:root {
  --bg: #f5f6fa;
  --bg-soft: #f0f2f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --ink: #101426;
  --ink-2: #343b52;
  --muted: #6b7386;
  --muted-2: #9aa1b2;
  --line: #e7e9f1;
  --line-strong: #d9dce8;
  --brand: #5b6cff;
  --brand-600: #4a5aef;
  --brand-700: #3d4bd4;
  --brand-soft: #eef0ff;
  --teal: #14b8a6;
  --teal-soft: #e9faf7;
  --amber: #f59e0b;
  --amber-soft: #fef5e7;
  --red: #ef4444;
  --red-soft: #fdeeee;
  --green: #10b981;
  --green-soft: #e9f9f3;
  --violet: #8b5cf6;
  --violet-soft: #f3eeff;
  --sidebar: #0b1022;
  --sidebar-2: #121936;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-xs: 0 1px 2px rgba(16, 20, 38, 0.04);
  --shadow-sm: 0 1px 2px rgba(16, 20, 38, 0.04), 0 6px 18px rgba(16, 20, 38, 0.045);
  --shadow-lg: 0 24px 70px rgba(10, 14, 32, 0.18);
  --font: 'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --mono: 'SFMono-Regular', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 78% -12%, rgba(91, 108, 255, 0.075), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(20, 184, 166, 0.045), transparent 60%);
  z-index: -1;
}

::selection {
  background: rgba(91, 108, 255, 0.22);
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.right {
  text-align: right;
}

.ico {
  flex: none;
  display: inline-block;
  vertical-align: -2px;
}

.logo-mark {
  display: block;
  border-radius: 10px;
  flex: none;
}

/* ── 按钮 ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 550;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--surface-2);
  border-color: #cbd0e0;
  color: var(--ink);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(180deg, #6474ff, var(--brand));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(91, 108, 255, 0.28);
}

.btn.primary:hover {
  background: linear-gradient(180deg, #5969f7, var(--brand-600));
  box-shadow: 0 8px 22px rgba(91, 108, 255, 0.34);
  color: #fff;
}

.btn.ghost {
  background: var(--surface);
}

.btn.soft {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand-700);
}

.btn.soft:hover {
  background: #e3e7ff;
  border-color: transparent;
}

.btn.danger {
  background: var(--red);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.24);
}

.btn.danger:hover {
  background: #dc2626;
  color: #fff;
}

.btn.danger.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--red);
  box-shadow: none;
}

.btn.danger.ghost:hover {
  background: var(--red-soft);
}

.btn.light {
  background: rgba(255, 255, 255, 0.92);
  border-color: transparent;
  color: var(--ink);
}

.btn.light:hover {
  background: #fff;
  color: var(--ink);
}

.btn.sm {
  height: 31px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
  gap: 5px;
}

.btn.lg {
  height: 46px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 12px;
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: all 0.16s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

.icon-btn.danger:hover {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 550;
  padding: 4px 6px;
  border-radius: 6px;
}

.text-btn:hover {
  background: var(--brand-soft);
}

/* ── 表单 ─────────────────────────────────────────────────── */

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

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.field-label em {
  color: var(--red);
  font-style: normal;
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted-2);
}

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fbfbfd;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.input::placeholder {
  color: #a6acbc;
}

.input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.13);
}

.input:disabled {
  background: var(--surface-2);
  color: var(--muted);
}

.textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  line-height: 1.65;
  resize: vertical;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7386' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

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

.form-grid .span-2 {
  grid-column: span 2;
}

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

.check-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.check-item:hover {
  border-color: #c9cffa;
  background: #f7f8ff;
}

.check-item input {
  accent-color: var(--brand);
  width: 15px;
  height: 15px;
  margin: 0;
}

.check-item small {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10.5px;
}

.check-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.confirm-text {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.7;
}

/* ── 通用组件 ─────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: #f0f2f7;
  color: var(--muted);
}

.chip.green,
.chip.teal {
  background: var(--green-soft);
  color: #0b7a55;
}

.chip.blue,
.chip.brand {
  background: var(--brand-soft);
  color: var(--brand-700);
}

.chip.amber {
  background: var(--amber-soft);
  color: #a15c00;
}

.chip.red {
  background: var(--red-soft);
  color: #b42323;
}

.chip.violet {
  background: var(--violet-soft);
  color: #6d3fd1;
}

.chip.slate {
  background: #f0f2f7;
  color: #647086;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e7e9ff, #d9f7f3);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

.avatar.sm {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 10px;
}

.avatar.xs {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 9px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.delta.up {
  background: var(--green-soft);
  color: #0b7a55;
}

.delta.down {
  background: var(--red-soft);
  color: #b42323;
}

.delta.flat {
  background: #f0f2f7;
  color: var(--muted);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: #eef0f6;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #7d8bff);
  transition: width 0.4s ease;
}

.progress > span.warn {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.copyable {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  max-width: 100%;
  transition: all 0.15s ease;
}

.copyable:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.copyable code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copyable .ico {
  color: var(--muted-2);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 46px 20px;
  text-align: center;
}

.empty-orb {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand-soft), #e9faf7);
  color: var(--brand-600);
  margin-bottom: 4px;
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 650;
}

.empty-state p {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.7;
}

.empty-state .btn {
  margin-top: 8px;
}

.mini-note {
  font-size: 11px;
  color: var(--brand-600);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 600;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 应用骨架 ─────────────────────────────────────────────── */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  flex: none;
  background:
    radial-gradient(420px 260px at 10% -4%, rgba(91, 108, 255, 0.32), transparent 65%),
    linear-gradient(180deg, #121938 0%, #0b1022 52%, #080c1a 100%);
  color: #dfe3f5;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  padding: 18px 14px 14px;
  overflow: hidden;
}

.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 55%);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 16px;
  position: relative;
  z-index: 1;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.wordmark strong {
  font-size: 19px;
  letter-spacing: 0.06em;
  color: #fff;
  font-weight: 700;
}

.wordmark span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #a9b2ff;
  border: 1px solid rgba(169, 178, 255, 0.35);
  padding: 1px 4px;
  border-radius: 4px;
}

.sidebar-collapse {
  border: none;
  background: transparent;
  color: #7f89ad;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: none;
}

.workspace-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  margin: 0 2px 12px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: all 0.16s ease;
}

.workspace-chip:hover {
  background: rgba(255, 255, 255, 0.075);
}

.ws-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7d8bff, #20c7c9);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.workspace-chip > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.workspace-chip strong {
  font-size: 12px;
  color: #eef1ff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-chip span {
  font-size: 10px;
  color: #7f89ad;
}

.workspace-chip .ico {
  color: #6c769b;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 2px 0 10px;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
}

.nav::-webkit-scrollbar {
  width: 0;
}

.nav-section {
  margin-bottom: 14px;
}

.nav-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5f698c;
  padding: 4px 11px 6px;
  font-weight: 650;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 37px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #a8b1cf;
  border-radius: 9px;
  font-size: 12.5px;
  text-align: left;
  position: relative;
  transition: all 0.16s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #eef1ff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(91, 108, 255, 0.28), rgba(91, 108, 255, 0.1));
  color: #fff;
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #8b99ff;
  box-shadow: 0 0 12px rgba(139, 153, 255, 0.7);
}

.nav-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  color: #7f89ad;
}

.nav-item.active .nav-icon {
  color: #aab5ff;
}

.nav-count {
  margin-left: auto;
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.1);
  color: #b9c1df;
  min-width: 20px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-mini {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 11px;
  padding: 10px 11px;
}

.plan-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #c7cde6;
  font-weight: 600;
}

.plan-mini-head button {
  border: none;
  background: transparent;
  color: #9faaff;
  font-size: 10.5px;
  padding: 0;
}

.plan-mini-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0 6px;
  overflow: hidden;
}

.plan-mini-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7d8bff, #20c7c9);
  border-radius: 999px;
}

.plan-mini small {
  font-size: 9.5px;
  color: #6c769b;
}

.assistant-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(139, 153, 255, 0.24);
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.18), rgba(20, 184, 166, 0.09));
  border-radius: 11px;
  padding: 9px 10px;
  color: #e8ebff;
  text-align: left;
  transition: all 0.16s ease;
}

.assistant-entry:hover {
  border-color: rgba(139, 153, 255, 0.5);
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.26), rgba(20, 184, 166, 0.13));
}

.assistant-orb {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6d7dff, #19c6c9);
  color: #fff;
  flex: none;
  box-shadow: 0 4px 12px rgba(91, 108, 255, 0.35);
}

.assistant-entry > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.assistant-entry strong {
  font-size: 11.5px;
  font-weight: 600;
}

.assistant-entry small {
  font-size: 9.5px;
  color: #8b95b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assistant-entry > .ico {
  color: #8b95b8;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 4px;
}

.user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-copy strong {
  font-size: 11.5px;
  color: #e6e9f8;
  font-weight: 600;
}

.user-copy span {
  font-size: 9.5px;
  color: #6c769b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-row .icon-btn {
  color: #6c769b;
}

.user-row .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  color: #fff;
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 248px;
}

/* ── 顶栏 ─────────────────────────────────────────────────── */

.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(231, 233, 241, 0.8);
  background: rgba(245, 246, 250, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.mobile-menu {
  display: none;
}

.topbar-title {
  display: flex;
  flex-direction: column;
  min-width: 118px;
}

.topbar-title .crumb {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.topbar-title strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.topbar-search {
  flex: 1;
  max-width: 430px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted-2);
  transition: all 0.16s ease;
}

.topbar-search:focus-within {
  background: #fff;
  border-color: #c7cdf9;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.09);
}

.topbar-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--ink);
  min-width: 0;
}

.topbar-search input::placeholder {
  color: #a6acbc;
}

.topbar-search kbd {
  font-family: var(--font);
  font-size: 9.5px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: 5px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
}

.brand-switch select {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  max-width: 132px;
  appearance: none;
  padding-right: 2px;
}

.brand-switch .ico {
  color: var(--muted-2);
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.1);
}

.topbar .icon-btn {
  position: relative;
  background: #fff;
  border-color: var(--line);
}

.notif-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px #fff;
}

.assistant-top {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, #eef0ff, #e9faf7);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.assistant-top:hover {
  box-shadow: 0 4px 14px rgba(91, 108, 255, 0.16);
}

.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #dfe3ff, #d3f5f0);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 12px;
  margin-left: 3px;
}

/* ── 页面 ─────────────────────────────────────────────────── */

.view {
  padding: 26px 28px 56px;
  max-width: 1440px;
  margin: 0 auto;
}

.page {
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from {
    transform: translateY(5px);
  }
  to {
    transform: translateY(0);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-600);
  font-weight: 700;
  margin-bottom: 5px;
}

.page-head h1 {
  font-size: 27px;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.page-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 720px;
}

.head-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  flex: none;
}

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

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

.kpi {
  padding: 15px 16px 13px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kpi:hover {
  box-shadow: var(--shadow-sm);
}

.kpi::after {
  content: '';
  position: absolute;
  right: -28px;
  top: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 108, 255, 0.09), transparent 68%);
  pointer-events: none;
}

.kpi-teal::after {
  background: radial-gradient(circle, rgba(20, 184, 166, 0.11), transparent 68%);
}

.kpi-violet::after {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.11), transparent 68%);
}

.kpi-amber::after {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 68%);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 550;
}

.kpi-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-600);
}

.kpi-teal .kpi-icon {
  background: var(--teal-soft);
  color: #0b8f82;
}

.kpi-violet .kpi-icon {
  background: var(--violet-soft);
  color: #7546da;
}

.kpi-amber .kpi-icon {
  background: var(--amber-soft);
  color: #b16a00;
}

.kpi-value {
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-value small {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted-2);
  letter-spacing: 0;
  margin-left: 3px;
}

.kpi-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  min-height: 22px;
}

.kpi-hint {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-spark {
  margin-left: auto;
  width: 80px;
  height: 26px;
}

.sparkline {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.section-head p {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}

.section-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

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

.chart-card {
  padding-bottom: 10px;
}

.chart-wrap {
  padding: 0 14px 8px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 5px 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.chart-legend-note {
  margin-left: auto;
  color: var(--muted-2);
}

.line-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-grid {
  stroke: #eef0f6;
  stroke-width: 1;
}

.chart-ylabel,
.chart-xlabel {
  fill: #9aa1b2;
  font-size: 9.5px;
  font-family: var(--font);
}

.chart-empty {
  height: 240px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 12px;
}

.engine-list {
  padding: 2px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.engine-row {
  display: grid;
  grid-template-columns: minmax(86px, auto) 34px minmax(40px, 1fr) 30px;
  align-items: center;
  gap: 9px;
}

.engine-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.engine-mode {
  font-size: 9px;
  color: var(--muted-2);
  background: var(--surface-2);
  border-radius: 4px;
  text-align: center;
  padding: 1px 0;
}

.bar-track {
  height: 6px;
  border-radius: 999px;
  background: #eef0f6;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 3px;
  transition: width 0.5s ease;
}

.engine-row strong {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.engine-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 2px 18px 16px;
}

.engine-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  background: var(--surface-2);
}

.engine-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
}

.engine-card-top strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.engine-card-top > span {
  margin-left: auto;
  font-size: 8.5px;
  color: var(--muted-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  flex: none;
}

.engine-card-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 4px 0 1px;
  font-variant-numeric: tabular-nums;
}

.engine-card-score small {
  font-size: 8.5px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0;
}

.engine-card-sub {
  font-size: 9px;
  color: var(--muted-2);
}

.engine-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 6px 18px 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.engine-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.engine-foot strong {
  color: var(--ink-2);
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px 22px;
}

.donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
}

.donut::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 38, 0.04);
}

.donut-center {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.donut-center strong {
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.donut-center span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.donut-legend {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}

.legend-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-value {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pipeline {
  padding: 6px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.pipeline-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
}

.pipeline-bars {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  background: var(--surface-2);
}

.pipe-seg {
  display: block;
  border-radius: 3px;
}

.pipe-seg.published,
.pipe-seg.done {
  background: #34c99d;
}

.pipe-seg.review {
  background: #f5b545;
}

.pipe-seg.draft {
  background: #d9ddea;
}

.pipe-seg.progress {
  background: #6d7dff;
}

.pipeline-meta {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.content-callout {
  margin: 4px 18px 18px;
  padding: 13px 14px;
  background: linear-gradient(120deg, #f5f6ff, #eefaf7);
  border: 1px solid #e5e8ff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-callout > div {
  flex: 1;
}

.callout-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-600);
  text-transform: uppercase;
}

.content-callout p {
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 2px;
}

.gap-list {
  padding: 0 18px 10px;
}

.gap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.gap-row:last-child {
  border-bottom: none;
}

.gap-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gap-main strong {
  font-size: 12px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gap-main span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.gap-score {
  width: 34px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.gap-score.low {
  background: var(--red-soft);
  color: #b42323;
}

.timeline {
  padding: 2px 18px 16px;
}

.timeline-item {
  display: flex;
  gap: 11px;
  padding: 9px 0;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 32px;
  bottom: -9px;
  width: 1px;
  background: var(--line);
}

.timeline-dot {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-600);
  flex: none;
  z-index: 1;
}

.timeline-dot.scan {
  background: #eef2ff;
  color: #4f5fe8;
}

.timeline-dot.citation {
  background: var(--teal-soft);
  color: #0b8f82;
}

.timeline-dot.article,
.timeline-dot.publish {
  background: var(--amber-soft);
  color: #a15c00;
}

.timeline-dot.billing {
  background: var(--violet-soft);
  color: #6d3fd1;
}

.timeline-copy {
  min-width: 0;
}

.timeline-copy p {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.timeline-copy > span {
  font-size: 10px;
  color: var(--muted-2);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-stats > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mini-stats strong {
  font-size: 20px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.mini-stats span {
  font-size: 10.5px;
  color: var(--muted);
}

/* ── 表格 ─────────────────────────────────────────────────── */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 0 2px 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fbfbfd;
}

.data-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.data-table th:last-child {
  border-radius: 0 8px 8px 0;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f1f6;
  color: var(--ink-2);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.13s ease;
}

.data-table tbody tr:hover {
  background: #fafbff;
}

.data-table.compact th,
.data-table.compact td {
  padding: 8px 10px;
}

.cell-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 550;
  color: var(--ink);
}

.cell-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.engine-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 550;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.score-pill.low {
  background: var(--red-soft);
  color: #b42323;
}

.score-pill.high {
  background: var(--green-soft);
  color: #0b7a55;
}

.link-title {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 12.5px;
  text-align: left;
  line-height: 1.45;
}

.link-title:hover {
  color: var(--brand-600);
}

.impact {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 90px;
}

.impact > span {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #7d8bff);
  max-width: 70px;
  flex: none;
}

.impact small {
  font-size: 10px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.status-select {
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 10.5px;
  color: var(--ink-2);
  padding: 0 5px;
  outline: none;
}

.status-select:focus {
  border-color: var(--brand);
}

.table-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-line {
  margin-bottom: 16px;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.chip-btn {
  height: 29px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: var(--surface);
  border-color: var(--line);
}

.chip-btn.active {
  background: var(--ink);
  color: #fff;
  font-weight: 550;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  color: var(--muted-2);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 11.5px;
  width: 190px;
  color: var(--ink);
}

/* ── 品牌 ─────────────────────────────────────────────────── */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.brand-card {
  padding: 17px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.brand-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.brand-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand-color);
  opacity: 0.85;
}

.brand-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand-color) 12%, white);
  color: var(--brand-color);
  font-size: 18px;
  font-weight: 700;
  flex: none;
}

.brand-title {
  flex: 1;
  min-width: 0;
}

.brand-title h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-title p {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-tag {
  font-size: 9px;
  font-weight: 650;
  color: var(--brand-700);
  background: var(--brand-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.brand-card-tools {
  display: flex;
  gap: 1px;
  margin: -4px -5px 0 0;
}

.brand-score-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 2px 14px;
}

.score-ring {
  border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--score) * 1%), #eceef5 0);
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
}

.score-ring-inner {
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring-inner strong {
  font-size: 21px;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 700;
}

.score-ring-inner span {
  font-size: 8px;
  color: var(--muted-2);
}

.brand-score-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  flex: 1;
}

.brand-score-meta div {
  display: flex;
  flex-direction: column;
}

.brand-score-meta span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.brand-score-meta strong {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-score-meta .small-strong {
  font-size: 11px;
  font-weight: 550;
  color: var(--ink-2);
  margin-top: 3px;
}

.brand-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.brand-stat-grid div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.brand-stat-grid strong {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.brand-stat-grid span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.brand-card-foot {
  display: flex;
  gap: 8px;
  padding-top: 13px;
}

.brand-card-foot .btn {
  flex: 1;
}

/* ── 引导 ─────────────────────────────────────────────────── */

.onboarding {
  padding: 44px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background:
    radial-gradient(460px 260px at 50% 0%, rgba(91, 108, 255, 0.08), transparent 70%),
    var(--surface);
}

.onboarding-orb {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand-soft), #e6fbf7);
  color: var(--brand-600);
  margin-bottom: 4px;
}

.onboarding h2 {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.onboarding > p {
  max-width: 500px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.onboarding-steps {
  display: flex;
  gap: 14px;
  margin: 16px 0 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.onboarding-step {
  width: 150px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}

.onboarding-step > span {
  font-size: 9.5px;
  color: var(--brand-600);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.onboarding-step strong {
  font-size: 12px;
}

.onboarding-step small {
  font-size: 10px;
  color: var(--muted-2);
}

/* ── 洞察与竞品 ───────────────────────────────────────────── */

.insight-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background:
    radial-gradient(400px 160px at 100% 0%, rgba(20, 184, 166, 0.2), transparent 70%),
    linear-gradient(115deg, #101733, #1b2450);
  color: #e9ecff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.insight-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.insight-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: #aeb8ff;
  flex: none;
}

.insight-banner > div:nth-child(2) {
  flex: 1;
}

.insight-kicker {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: #8f9bd8;
  text-transform: uppercase;
  font-weight: 700;
}

.insight-banner p {
  font-size: 12.5px;
  margin-top: 3px;
  line-height: 1.65;
  color: #d7dcf7;
}

.share-list {
  padding: 6px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.share-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.share-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-row.brand .share-name {
  color: var(--brand-700);
  font-weight: 650;
}

.you-tag {
  font-size: 8.5px;
  background: var(--brand-soft);
  color: var(--brand-700);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 650;
}

.share-bar {
  height: 8px;
  border-radius: 999px;
  background: #eef0f6;
  overflow: hidden;
}

.share-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #c3c9dd;
}

.share-row.brand .share-bar span {
  background: linear-gradient(90deg, var(--brand), #7d8bff);
}

.share-row > strong {
  text-align: right;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.matrix-self {
  color: var(--brand-700);
  font-weight: 650;
}

/* ── 引文 ─────────────────────────────────────────────────── */

.citation-table .link-title {
  max-width: 380px;
}

.citation-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.citation-url {
  padding: 10px;
  background: var(--surface-2);
  border-radius: 9px;
  border: 1px dashed var(--line-strong);
}

.detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.detail-kpis > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-kpis span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.detail-kpis strong {
  font-size: 13px;
  font-weight: 650;
}

/* ── 扫描详情 ─────────────────────────────────────────────── */

.answer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.answer-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
}

.answer-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  cursor: pointer;
  background: var(--surface-2);
}

.answer-item summary::-webkit-details-marker {
  display: none;
}

.answer-prompt {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.answer-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.answer-body {
  padding: 13px;
  border-top: 1px solid var(--line);
}

.answer-body pre {
  margin: 0;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  background: #fafbff;
  border: 1px solid #eef0f8;
  border-radius: 9px;
  padding: 12px;
  max-height: 340px;
  overflow-y: auto;
}

.answer-meta {
  display: flex;
  gap: 16px;
  margin: 10px 0 8px;
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.answer-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.citation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.citation-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--brand-600);
  background: var(--brand-soft);
  padding: 3px 7px;
  border-radius: 5px;
  text-decoration: none;
}

.scan-note {
  display: flex;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 10px;
  background: linear-gradient(120deg, #f4f6ff, #eefbf8);
  border: 1px solid #e6e9ff;
  color: var(--brand-700);
  margin-bottom: 16px;
}

.scan-note p {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

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

/* ── 看板 / 意图 ──────────────────────────────────────────── */

.kanban {
  display: grid;
  gap: 13px;
  margin-bottom: 16px;
  align-items: start;
}

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

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

.kanban-col {
  background: rgba(240, 242, 248, 0.6);
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 120px;
  overflow: hidden;
}

.kanban-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.kanban-head > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.kanban-head strong {
  font-size: 11.5px;
  font-weight: 650;
}

.kanban-head small {
  font-size: 9.5px;
  color: var(--muted-2);
}

.kanban-count {
  font-size: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  min-width: 20px;
  height: 19px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.kanban-body {
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  padding: 16px;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted-2);
}

.intent-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  transition: box-shadow 0.16s ease;
}

.intent-card:hover {
  box-shadow: var(--shadow-sm);
}

.intent-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.intent-card-top strong {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.intent-metrics {
  display: flex;
  gap: 18px;
  margin: 9px 0 7px;
}

.intent-metrics div {
  display: flex;
  flex-direction: column;
}

.intent-metrics span {
  font-size: 9px;
  color: var(--muted-2);
}

.intent-metrics strong {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.intent-card .tag-row {
  margin-top: 9px;
}

.intent-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.intent-actions .text-btn {
  margin-right: auto;
}

.toggle {
  width: 30px;
  height: 18px;
  border-radius: 999px;
  border: none;
  background: #d9ddea;
  padding: 2px;
  transition: background 0.18s ease;
}

.toggle span {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.18s ease;
}

.toggle.on {
  background: var(--brand);
}

.toggle.on span {
  transform: translateX(12px);
}

/* ── 优化单元 ─────────────────────────────────────────────── */

.unit-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  transition: box-shadow 0.16s ease;
}

.unit-card:hover {
  box-shadow: var(--shadow-sm);
}

.unit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.unit-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
}

.unit-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--muted-2);
}

.unit-due.overdue {
  color: var(--red);
}

.unit-card h4 {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.unit-intent {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--muted-2);
  margin-top: 4px;
}

.unit-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0;
}

.unit-progress .progress {
  flex: 1;
}

.unit-progress small {
  font-size: 9px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.unit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.unit-owner {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-actions {
  display: flex;
  gap: 0;
}

.unit-actions .icon-btn {
  width: 26px;
  height: 26px;
}

/* ── 知识库 ───────────────────────────────────────────────── */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 13px;
}

.doc-card {
  padding: 15px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.doc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.doc-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

.doc-date {
  font-size: 9px;
  color: var(--muted-2);
}

.doc-card h3 {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.doc-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  margin: 7px 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-foot {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 9.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 文章 ─────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 14px;
}

.tab {
  height: 31px;
  padding: 0 14px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.tab span {
  font-size: 9.5px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 6px;
}

.tab.active {
  background: var(--ink);
  color: #fff;
  font-weight: 550;
}

.tab.active span {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.article-preview {
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 6px;
}

.markdown {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
}

.markdown h2,
.markdown h3,
.markdown h4 {
  color: var(--ink);
  margin: 18px 0 7px;
  letter-spacing: -0.02em;
}

.markdown h2 {
  font-size: 17px;
}

.markdown h3 {
  font-size: 15px;
}

.markdown h4 {
  font-size: 13.5px;
}

.markdown p {
  margin: 7px 0;
}

.markdown ul,
.markdown ol {
  margin: 7px 0;
  padding-left: 20px;
}

.markdown li {
  margin: 3px 0;
}

.markdown blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
  font-size: 12px;
}

.markdown code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 4px;
  border-radius: 4px;
}

.markdown a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── 计费 ─────────────────────────────────────────────────── */

.billing-cycle {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.billing-cycle .btn {
  border: none;
  box-shadow: none;
}

.billing-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 30px;
  padding: 22px;
  margin-bottom: 16px;
  background:
    radial-gradient(500px 260px at 0% 0%, rgba(91, 108, 255, 0.08), transparent 70%),
    var(--surface);
}

.billing-plan h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 25px;
  letter-spacing: -0.04em;
  margin: 5px 0 4px;
}

.billing-plan p {
  font-size: 11.5px;
  color: var(--muted);
}

.usage-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.usage-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.usage-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
}

.usage-label strong {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.usage-label small {
  color: var(--muted-2);
  font-weight: 400;
}

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

.plan-card {
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border-color: #c7cdfa;
  box-shadow: 0 12px 40px rgba(91, 108, 255, 0.12);
}

.plan-card.current {
  border-color: var(--brand);
}

.plan-badge {
  position: absolute;
  top: -9px;
  right: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 999px;
}

.plan-card h3 {
  font-size: 16px;
  font-weight: 650;
}

.plan-tagline {
  font-size: 10.5px;
  color: var(--muted-2);
  margin: 3px 0 12px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 13px;
}

.plan-price strong {
  font-size: 27px;
  letter-spacing: -0.045em;
}

.plan-price span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-2);
}

.plan-features .ico {
  color: var(--green);
}

.payment-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: #9a6200;
  background: var(--amber-soft);
  border: 1px solid #f7e3bb;
  padding: 9px 12px;
  border-radius: 9px;
  margin-bottom: 16px;
}

.invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
  gap: 24px;
  padding: 22px;
  margin-bottom: 16px;
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(20, 184, 166, 0.1), transparent 65%),
    radial-gradient(500px 300px at 0% 100%, rgba(91, 108, 255, 0.08), transparent 65%),
    var(--surface);
}

.invite-main h2 {
  font-size: 20px;
  letter-spacing: -0.03em;
  margin: 4px 0 5px;
}

.invite-main > p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.invite-link-row .copyable {
  width: 100%;
  max-width: 520px;
  background: #fff;
}

.invite-link-row .copyable code {
  flex: 1;
}

.invite-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
}

.invite-code {
  font-size: 10.5px;
  color: var(--muted-2);
}

.invite-code strong {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand-700);
  letter-spacing: 0.06em;
  margin-left: 2px;
}

.invite-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: center;
}

.invite-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
}

.invite-stats strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.invite-stats span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.invite-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px dashed #bfc7f5;
  background: linear-gradient(120deg, #f5f7ff, #eefbf8);
  border-radius: 10px;
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.5;
}

.invite-banner code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--brand-700);
  background: #fff;
  padding: 1px 5px;
  border-radius: 4px;
}

.checkout-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-2);
}

.checkout-plan {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.checkout-plan span {
  font-size: 14px;
  font-weight: 650;
}

.checkout-plan strong {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.checkout-cycle {
  font-size: 10.5px;
  color: var(--muted-2);
  margin: 2px 0 14px;
}

.mock-pay {
  text-align: center;
  padding: 4px 0 10px;
}

.mock-pay-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--brand-soft), #e6fbf7);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.mock-pay h3 {
  font-size: 15px;
}

.mock-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin: 6px 0;
}

.mock-pay p {
  font-size: 10.5px;
  color: var(--muted-2);
}

.mock-pay code {
  font-family: var(--mono);
  font-size: 10px;
}

.mock-pay .inline-note {
  justify-content: center;
  margin-top: 14px;
}

/* ── 设置 ─────────────────────────────────────────────────── */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 14px;
  align-items: start;
}

.settings-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-main .card {
  padding-bottom: 18px;
}

.settings-form {
  padding: 4px 18px 0;
}

.settings-main .form-actions {
  margin-top: 14px;
}

.key-list {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
}

.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.key-row:last-child {
  border-bottom: none;
}

.key-row.revoked {
  opacity: 0.55;
}

.key-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}

.key-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.key-main strong {
  font-size: 11.5px;
}

.key-main span {
  font-size: 9.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.key-main code {
  font-family: var(--mono);
  font-size: 9.5px;
}

.integration-block {
  padding: 0 18px 14px;
}

.integration-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.code-block {
  margin: 6px 0 0;
  padding: 12px;
  border-radius: 9px;
  background: #0f1428;
  color: #c8d2ff;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.integration-steps {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.9;
}

.integration-steps code {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--surface-2);
  padding: 1px 4px;
  border-radius: 4px;
}

.member-list {
  padding: 0 18px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.member-row:last-child {
  border-bottom: none;
}

.member-row > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.member-row strong {
  font-size: 11.5px;
}

.member-row span:not(.avatar):not(.chip) {
  font-size: 10px;
  color: var(--muted-2);
}

.settings-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-card {
  padding: 18px;
  text-align: center;
}

.about-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  background: linear-gradient(145deg, var(--brand-soft), #e6fbf7);
  color: var(--brand-600);
}

.about-card h3 {
  font-size: 15px;
}

.about-card > p {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 5px 0 14px;
}

.about-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.about-meta strong {
  color: var(--ink-2);
  font-weight: 600;
}

.about-card .btn {
  margin-top: 14px;
}

.tip-card {
  padding: 18px;
  background:
    radial-gradient(280px 160px at 100% 0%, rgba(20, 184, 166, 0.12), transparent 65%),
    linear-gradient(150deg, #f6f8ff, #eefaf7);
  border-color: #e2e7fa;
}

.tip-card h3 {
  font-size: 15px;
  margin: 5px 0 4px;
}

.tip-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 13px;
}

.contact-card {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-2);
}

.contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

.new-key {
  padding: 6px 0 12px;
}

.new-key .copyable {
  width: 100%;
  justify-content: center;
}

/* ── 搜索 ─────────────────────────────────────────────────── */

.search-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-group h4 {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  margin-bottom: 5px;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: none;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  color: var(--ink-2);
}

.search-result:hover {
  background: var(--surface-2);
}

.search-result-icon {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  flex: none;
}

.search-result > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-result strong {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result small {
  font-size: 9.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result > .ico {
  color: var(--muted-2);
}

/* ── 弹窗 / 通知 ──────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 12, 28, 0.52);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.modal {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.modal.md {
  max-width: 600px;
}

.modal.lg {
  max-width: 800px;
}

.modal.xl {
  max-width: 980px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 17px;
  letter-spacing: -0.025em;
  font-weight: 650;
}

.modal-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  min-height: 0;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fbfbfd;
}

.modal-foot-extra {
  flex: 1;
}

.modal-foot-btns {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #161d33;
  color: #eef1ff;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: 0 14px 40px rgba(8, 12, 28, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.22s ease;
  pointer-events: none;
  max-width: 380px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #3a1218;
  border-color: rgba(255, 255, 255, 0.1);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  flex: none;
  color: #8ff0cf;
}

.toast.error .toast-icon {
  color: #ffb4b4;
}

#toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.error-card {
  max-width: 460px;
  margin: 60px auto;
  padding: 30px;
  text-align: center;
}

.error-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.error-card h2 {
  font-size: 17px;
}

.error-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 16px;
}

.boot-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

/* ── 骨架屏 ───────────────────────────────────────────────── */

.sk {
  background: linear-gradient(90deg, #eef0f6 25%, #f6f7fa 37%, #eef0f6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.sk-title {
  width: 240px;
  height: 34px;
  margin-bottom: 24px;
}

.sk-line {
  width: 50%;
  height: 12px;
  margin-bottom: 12px;
}

.sk-big {
  width: 40%;
  height: 30px;
}

.skeleton-stack {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-row {
  display: flex;
  gap: 10px;
}

.sk-1 {
  width: 30%;
  height: 14px;
}

.sk-2 {
  width: 50%;
  height: 14px;
}

.sk-3 {
  width: 20%;
  height: 14px;
}

/* ── 对话面板 ─────────────────────────────────────────────── */

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #6d7dff, #19c6c9);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 34px rgba(91, 108, 255, 0.4);
  transition: all 0.2s ease;
}

.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(91, 108, 255, 0.48);
}

.chat-fab.hidden {
  display: none;
}

.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 430px;
  max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px rgba(10, 14, 32, 0.16);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.28s cubic-bezier(0.22, 0.85, 0.3, 1);
  visibility: hidden;
}

.chat-panel.open {
  transform: translateX(0);
  visibility: visible;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfbff, #fff);
}

.chat-identity {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-avatar {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6d7dff, #19c6c9);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 5px 14px rgba(91, 108, 255, 0.3);
}

.chat-avatar.sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  box-shadow: none;
}

.chat-identity > div {
  display: flex;
  flex-direction: column;
}

.chat-identity strong {
  font-size: 13px;
  font-weight: 650;
}

.chat-identity span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.chat-head-actions {
  display: flex;
  gap: 2px;
}

.chat-context {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.chat-context strong {
  color: var(--ink-2);
  font-weight: 600;
}

.chat-mode {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
  display: inline-block;
  flex: none;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar {
  width: 5px;
}

.chat-body::-webkit-scrollbar-thumb {
  background: #d9ddea;
  border-radius: 999px;
}

.chat-welcome {
  text-align: center;
  padding: 34px 16px 18px;
}

.chat-welcome-orb {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eef0ff, #e6fbf7);
  color: var(--brand-600);
}

.chat-welcome h3 {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.chat-welcome > p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.75;
  margin: 6px auto 0;
  max-width: 320px;
}

.chat-welcome code {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--brand-soft);
  color: var(--brand-700);
  padding: 1px 5px;
  border-radius: 4px;
}

.chat-capabilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.chat-capabilities span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}

.chat-msg {
  display: flex;
  gap: 7px;
  max-width: 100%;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-bubble {
  background: #f4f5fa;
  border: 1px solid #eceef6;
  border-radius: 13px 13px 13px 4px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: calc(100% - 34px);
  overflow-wrap: anywhere;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--brand), #6d7dff);
  border-color: transparent;
  color: #fff;
  border-radius: 13px 13px 4px 13px;
  max-width: 84%;
}

.chat-text p {
  margin: 5px 0;
}

.chat-text p:first-child {
  margin-top: 0;
}

.chat-text p:last-child {
  margin-bottom: 0;
}

.chat-text.long {
  max-height: 360px;
  overflow-y: auto;
  font-size: 11.5px;
}

.chat-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 3px 0 8px;
}

.chat-metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-metric > span {
  font-size: 9px;
  color: var(--muted-2);
}

.chat-metric strong {
  font-size: 16px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.chat-metric small {
  font-size: 8.5px;
  color: var(--muted-2);
  font-weight: 400;
  margin-left: 2px;
}

.chat-metric .delta {
  align-self: flex-start;
  height: 17px;
  font-size: 9px;
  margin-top: 2px;
}

.chat-table {
  margin: 6px 0;
  overflow-x: auto;
}

.chat-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.chat-table th {
  text-align: left;
  color: var(--muted-2);
  font-weight: 600;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.chat-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #f1f2f7;
  color: var(--ink-2);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-table th.right,
.chat-table td.right {
  text-align: right;
}

.chat-table small {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  margin-top: 5px;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
}

.chat-list-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
}

.chat-list-item strong {
  font-size: 10.5px;
  font-weight: 600;
}

.chat-list-item span {
  font-size: 9.5px;
  color: var(--muted-2);
}

.chat-trend {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 4px 2px;
  margin: 6px 0;
}

.chat-trend .chart-legend {
  display: none;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.chat-actions .btn {
  height: 27px;
  font-size: 10px;
  padding: 0 8px;
}

.typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}

.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a9b0c3;
  animation: typing 1.2s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.chat-suggest {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 4px 14px 8px;
  scrollbar-width: none;
}

.chat-suggest::-webkit-scrollbar {
  display: none;
}

.chat-suggest button {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.chat-suggest button:hover {
  border-color: #c7cdfa;
  color: var(--brand-700);
  background: var(--brand-soft);
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 0 13px;
  padding: 7px 7px 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fbfbfd;
  transition: all 0.16s ease;
}

.chat-composer:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.1);
}

.chat-composer textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-size: 12px;
  line-height: 1.6;
  max-height: 140px;
  padding: 4px 0;
  color: var(--ink);
}

.chat-composer textarea::placeholder {
  color: #a6acbc;
}

.send-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, var(--brand), #6d7dff);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  transition: all 0.16s ease;
}

.send-btn:hover {
  box-shadow: 0 5px 14px rgba(91, 108, 255, 0.35);
}

.chat-hint {
  display: flex;
  justify-content: space-between;
  padding: 5px 15px 10px;
  font-size: 8.5px;
  color: var(--muted-2);
}

/* ── 登录 ─────────────────────────────────────────────────── */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  background: #fff;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 500px at 12% 8%, rgba(91, 108, 255, 0.34), transparent 65%),
    radial-gradient(600px 500px at 95% 90%, rgba(20, 184, 166, 0.18), transparent 60%),
    linear-gradient(150deg, #0d1329 0%, #0a0f22 55%, #07101f 100%);
  color: #eef1ff;
  padding: 32px 46px 26px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(70% 70% at 40% 30%, #000, transparent);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  right: -220px;
  bottom: -180px;
  border-radius: 50%;
  border: 1px solid rgba(139, 153, 255, 0.16);
  box-shadow:
    0 0 0 60px rgba(139, 153, 255, 0.045),
    0 0 0 130px rgba(139, 153, 255, 0.025);
  pointer-events: none;
}

.auth-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.auth-brand-head .wordmark strong {
  font-size: 22px;
}

.auth-brand-head .vendor {
  font-size: 10.5px;
  color: #8d97b8;
  letter-spacing: 0.08em;
}

.auth-copy {
  position: relative;
  z-index: 2;
  margin-top: 7vh;
  max-width: 560px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a9b3e8;
  border: 1px solid rgba(169, 179, 232, 0.22);
  background: rgba(169, 179, 232, 0.07);
  border-radius: 999px;
  padding: 4px 10px 4px 7px;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6df0c8;
  box-shadow: 0 0 0 3px rgba(109, 240, 200, 0.14);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(109, 240, 200, 0);
  }
}

.auth-copy h1 {
  font-size: clamp(34px, 3.7vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.045em;
  font-weight: 650;
  margin: 18px 0 16px;
  color: #f6f7ff;
}

.auth-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #aeb8ff, #6df0c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-copy > p {
  font-size: 13px;
  line-height: 1.85;
  color: #98a2c3;
  max-width: 480px;
}

.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.auth-features span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #c3cae4;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  padding: 5px 9px;
  border-radius: 7px;
}

.auth-visual {
  position: relative;
  z-index: 2;
  margin-top: 5vh;
  width: min(460px, 90%);
}

.ai-answer-card {
  background: rgba(20, 27, 52, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 15px 17px;
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.ai-answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.engine-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: #c5cdf0;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 3px 8px;
}

.live-badge {
  font-size: 8.5px;
  color: #6df0c8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6df0c8;
  box-shadow: 0 0 0 3px rgba(109, 240, 200, 0.14);
}

.ai-q {
  font-size: 11.5px;
  color: #dfe4f8;
  margin: 12px 0 10px;
  font-weight: 500;
}

.ai-answer {
  font-size: 11px;
  line-height: 1.75;
  color: #aab3d2;
}

.ai-answer p {
  margin: 5px 0;
}

.ai-answer mark {
  background: rgba(109, 240, 200, 0.16);
  color: #b9ffe9;
  padding: 0 2px;
  border-radius: 3px;
}

.ai-line {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.055);
  margin: 7px 0;
}

.ai-line.short {
  width: 64%;
}

.ai-citations {
  display: flex;
  gap: 5px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.ai-citations span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  color: #8e9ac6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 5px;
}

.ai-citations .cite-more {
  color: #6df0c8;
  border-color: rgba(109, 240, 200, 0.22);
}

.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  color: var(--ink);
  padding: 9px 13px;
  animation: floaty 5s ease-in-out infinite;
}

.float-score {
  right: -22px;
  top: -20px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 86px;
}

.float-score span {
  font-size: 8.5px;
  color: var(--muted);
}

.float-score strong {
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.float-score small {
  font-size: 9px;
  color: #0b7a55;
  font-weight: 600;
}

.float-cite {
  left: -18px;
  bottom: -22px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation-delay: 1.4s;
}

.float-cite > span {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: #0b8f82;
  display: grid;
  place-items: center;
}

.float-cite > div {
  display: flex;
  flex-direction: column;
}

.float-cite strong {
  font-size: 14px;
  line-height: 1.1;
}

.float-cite small {
  font-size: 8px;
  color: var(--muted);
}

@keyframes floaty {
  50% {
    transform: translateY(-6px);
  }
}

.auth-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #697392;
  position: relative;
  z-index: 2;
  padding-top: 30px;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background:
    radial-gradient(500px 400px at 100% 0%, rgba(91, 108, 255, 0.045), transparent 70%),
    #fff;
}

.auth-form-wrap {
  width: 100%;
  max-width: 390px;
}

.auth-mobile-logo {
  display: none;
}

.auth-tabs {
  display: flex;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
  margin-bottom: 26px;
}

.auth-tabs button {
  border: none;
  background: transparent;
  height: 31px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 20, 38, 0.1);
}

.auth-form-wrap h2 {
  font-size: 27px;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.auth-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form .input {
  height: 43px;
  background: #fbfbfd;
}

.auth-form .btn {
  margin-top: 4px;
}

.auth-error {
  min-height: 16px;
  font-size: 11px;
  color: var(--red);
}

.auth-demo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 13px;
  border: 1px dashed #cbd1f5;
  background: linear-gradient(120deg, #f7f8ff, #f1fbf9);
  border-radius: 11px;
}

.auth-demo > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-demo strong {
  font-size: 11px;
}

.auth-demo span {
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.auth-demo .btn {
  height: 30px;
  font-size: 11px;
  padding: 0 11px;
  flex: none;
}

.auth-terms {
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.7;
  margin-top: 22px;
}

/* ── 法务页面 ─────────────────────────────────────────────── */

.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px 24px 90px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 28px;
}

.legal-brand strong {
  font-size: 15px;
  letter-spacing: 0.03em;
}

.legal-brand span {
  font-size: 10px;
  color: var(--muted-2);
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.legal-back {
  display: inline-block;
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 18px;
}

.legal-page h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin: 8px 0 4px;
  color: var(--ink);
}

.legal-meta {
  font-size: 11px;
  color: var(--muted-2);
  margin-bottom: 28px;
}

.legal-page h2 {
  font-size: 16px;
  margin: 26px 0 6px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.legal-page p,
.legal-page li {
  color: var(--ink-2);
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-note {
  margin-top: 34px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 11px;
  color: var(--muted);
}

/* ── 响应式 ───────────────────────────────────────────────── */

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

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

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

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-aside {
    flex-direction: row;
  }

  .settings-aside .card {
    flex: 1;
  }
}

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

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

  .billing-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .usage-list {
    grid-template-columns: 1fr 1fr;
  }

  .brand-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .invite-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .invite-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .invite-stats > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-104%);
    transition: transform 0.25s cubic-bezier(0.22, 0.85, 0.3, 1);
    width: 260px;
    box-shadow: 24px 0 70px rgba(8, 12, 28, 0.3);
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-collapse {
    display: grid;
    place-items: center;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 28, 0.4);
    backdrop-filter: blur(2px);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .app-main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
    gap: 10px;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar-search {
    display: none;
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar-title .crumb {
    display: none;
  }

  .topbar-right {
    gap: 4px;
  }

  .assistant-top span {
    display: none;
  }

  .assistant-top {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .brand-switch {
    max-width: 150px;
  }

  .brand-switch select {
    max-width: 96px;
  }

  .view {
    padding: 20px 16px 50px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-head h1 {
    font-size: 23px;
  }

  .head-actions {
    width: 100%;
  }

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

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

  .kanban-3,
  .kanban-4 {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .canban-col {
    min-height: auto;
  }

  .auth {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-side {
    min-height: 100vh;
    padding: 28px 22px;
  }

  .auth-mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .auth-tabs {
    margin-bottom: 22px;
  }

  .settings-aside {
    flex-direction: column;
  }

  .float-score {
    right: 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 58px;
  }

  .topbar-title strong {
    font-size: 13px;
  }

  .topbar .icon-btn[data-act='notifications'] {
    display: none;
  }

  .brand-switch {
    max-width: 130px;
    padding: 0 7px;
  }

  .brand-switch select {
    max-width: 78px;
    font-size: 11px;
  }

  .avatar-btn {
    display: none;
  }

  .kpi-grid,
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }

  .kpi-value {
    font-size: 28px;
  }

  .mini-stats {
    grid-template-columns: 1fr 1fr;
  }

  .grid-main,
  .grid-2 {
    gap: 10px;
  }

  .section-head {
    padding: 14px 14px 0;
  }

  .section-head p {
    display: none;
  }

  .chart-wrap,
  .engine-list,
  .gap-list,
  .timeline,
  .share-list,
  .pipeline {
    padding-left: 12px;
    padding-right: 12px;
  }

  .donut-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 16px 20px;
  }

  .donut {
    align-self: center;
  }

  .donut-legend {
    width: 100%;
  }

  .brand-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }

  .check-group {
    grid-template-columns: 1fr;
  }

  .detail-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .usage-list {
    grid-template-columns: 1fr;
  }

  .settings-aside {
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .modal-body {
    padding: 15px 16px;
  }

  .modal-head {
    padding: 17px 16px 12px;
  }

  .modal-foot {
    padding: 12px 16px;
  }

  .chat-panel {
    width: 100vw;
    border-left: none;
  }

  .chat-fab {
    right: 16px;
    bottom: 16px;
  }

  .auth-form-wrap h2 {
    font-size: 23px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .brand-score-row {
    gap: 14px;
  }

  .billing-hero {
    padding: 17px;
  }

  .billing-plan h2 {
    font-size: 21px;
  }

  .page-head p {
    font-size: 11.5px;
  }

  .head-actions .btn {
    flex: 1;
  }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
