/* ============================================================
 * 万灵 V1.0 原型设计 Tokens —— 完整继承 V0.9 设计语言
 * 提取自 /Users/xmly/codes/ploymind_ai_design 实际代码
 * ============================================================ */

/* ---------- 字体 ---------- */
@import url('https://fonts.loli.net/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---------- 品牌色 ---------- */
  --brand: #3D7EFF;
  --brand-dark: #2966E6;
  --brand-light: #6CA0FF;
  --brand-gradient-from: #2563eb; /* blue-600 */
  --brand-gradient-to: #4f46e5;   /* indigo-600 */

  /* ---------- 灰度(zinc) ---------- */
  --zinc-50:  #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-900: #18181b;

  /* ---------- 语义色 ---------- */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* ---------- PageBackground 三色柔光 ---------- */
  --bg-soft-1: #d7ecff;
  --bg-soft-2: #c6f2ef;
  --bg-soft-3: #d9ddff;

  /* ---------- 圆角 ---------- */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* ---------- 阴影 ---------- */
  --shadow-card: 0 1px 2px rgba(24,24,27,0.06), 0 1px 3px rgba(24,24,27,0.04);
  --shadow-md:   0 4px 6px -1px rgba(24,24,27,0.06), 0 2px 4px -1px rgba(24,24,27,0.04);
  --shadow-lg:   0 10px 15px -3px rgba(24,24,27,0.08), 0 4px 6px -2px rgba(24,24,27,0.04);
  --shadow-modal: 0 25px 50px -12px rgba(24,24,27,0.25);

  /* ---------- 边栏宽度 ---------- */
  --sidebar-w-expanded: 240px;
  --sidebar-w-collapsed: 96px;
}

/* ---------- 基础排版 ---------- */
* { box-sizing: border-box; }
html, body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Inter', system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  color: var(--zinc-900);
  background: var(--zinc-50);
  margin: 0;
  padding: 0;
}

/* ---------- PageBackground 柔光圆斑(签名背景) ---------- */
.page-bg {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
.page-bg::before,
.page-bg::after,
.page-bg > .bg-blob {
  content: '';
  position: fixed;
  border-radius: 9999px;
  filter: blur(96px);
  pointer-events: none;
  z-index: 0;
}
.page-bg::before {
  top: -160px; left: -160px;
  width: 520px; height: 520px;
  background: var(--bg-soft-1);
  opacity: 0.6;
}
.page-bg::after {
  bottom: -160px; right: -160px;
  width: 480px; height: 480px;
  background: var(--bg-soft-2);
  opacity: 0.55;
}
.page-bg > .bg-blob {
  top: 30%; right: 25%;
  width: 360px; height: 360px;
  background: var(--bg-soft-3);
  opacity: 0.55;
}
.page-bg > .page-content { position: relative; z-index: 1; }

/* ---------- 卡片标准样式 ---------- */
.card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--zinc-200);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-lg);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: white;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary {
  background: white;
  color: var(--zinc-700);
  border-color: var(--zinc-200);
}
.btn-secondary:hover { background: var(--zinc-50); }
.btn-ghost {
  background: transparent;
  color: var(--zinc-700);
}
.btn-ghost:hover { background: var(--zinc-100); }
.btn-danger {
  background: white;
  color: var(--danger);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.05); }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- 输入框 ---------- */
.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--zinc-200);
  border-radius: var(--r-lg);
  background: white;
  font-size: 14px;
  color: var(--zinc-900);
  transition: all .15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61,126,255,0.12);
}
.input::placeholder { color: var(--zinc-400); }

/* ---------- 标签 / Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.badge-team  { background: rgba(61,126,255,0.10); color: var(--brand); }
.badge-private { background: var(--zinc-100); color: var(--zinc-600); }
.badge-admin { background: rgba(245,158,11,0.12); color: #b45309; }
.badge-member { background: var(--zinc-100); color: var(--zinc-600); }
.badge-success { background: rgba(16,185,129,0.10); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.10); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.10); color: var(--danger); }

/* ---------- 模态遮罩 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-panel {
  background: white;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-modal);
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

/* ---------- 分隔线 ---------- */
.divider {
  height: 1px;
  background: var(--zinc-200);
  border: 0;
  margin: 16px 0;
}

/* ---------- 可访问性 ---------- */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--zinc-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--zinc-300); }
