/* ============================================================
   凯酷溯伪 - 设计令牌与基础（Light Clean 2026）
   浅色系 / 白色基底 / 深绿主色 / 柔陶土强调色
   ============================================================ */
:root {
  /* 背景层：纯白系 */
  --bg-0: #fafafa;
  --bg-1: #f5f5f3;
  --bg-2: #eeeeea;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.88);

  /* 文字 */
  --text: #2a2a28;
  --text-strong: #151514;
  --muted: #6b6b66;
  --muted-2: #9a9a94;

  /* 强调色：深绿 + 柔陶土 */
  --cyan: #2d4739;          /* 深绿主色，作为主要 CTA 色 */
  --violet: #c97a4f;        /* 柔陶土辅助色 */
  --grad-accent: linear-gradient(135deg, #2d4739 0%, #3d5e4c 100%);
  --grad-accent-soft: linear-gradient(135deg, rgba(45,71,57,0.08), rgba(201,122,79,0.08));

  /* 线与边 */
  --hairline: rgba(0, 0, 0, 0.07);
  --hairline-strong: rgba(0, 0, 0, 0.14);
  --grad-hairline: linear-gradient(135deg, rgba(45,71,57,0.4), rgba(201,122,79,0.4));

  /* 语义色 */
  --ok: #3d8b5e;
  --warn: #c9963a;
  --err: #c44545;
  --info: #3a6ea5;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.09), 0 4px 8px rgba(0, 0, 0, 0.05);

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* 间距刻度 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 20px;
  --sp-5: 32px;
  --sp-6: 48px;

  /* 字体：标题 Serif，正文 Sans-serif */
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --mono: "JetBrains Mono", "SF Mono", "Consolas", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.1px;
  overflow-x: hidden;
}

/* 纯白 + 极淡纹理 */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-0);
}
.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
}

a { color: var(--cyan); text-decoration: none; transition: color .18s ease; }
a:hover { color: #1f3227; }

h1, h2, h3, h4 { color: var(--text-strong); font-weight: 600; line-height: 1.25; letter-spacing: -0.2px; }
h1 { font-size: clamp(28px, 4vw, 44px); font-family: var(--font-serif); }
h2 { font-size: clamp(22px, 3vw, 30px); font-family: var(--font-serif); }
h3 { font-size: 18px; }
h4 { font-size: 15px; }

p { color: var(--text); }
small { color: var(--muted); }

.gradient-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-strong);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn:hover { border-color: var(--hairline-strong); background: var(--bg-1); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.btn-primary {
  background: var(--grad-accent);
  border: none;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(45, 71, 57, 0.25);
}
.btn-primary:hover { filter: brightness(1.05); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(45, 71, 57, 0.32); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--muted);
}
.badge-ok { color: var(--ok); border-color: rgba(61,139,94,0.25); background: rgba(61,139,94,0.08); }
.badge-warn { color: var(--warn); border-color: rgba(201,150,58,0.25); background: rgba(201,150,58,0.08); }
.badge-err { color: var(--err); border-color: rgba(196,69,69,0.25); background: rgba(196,69,69,0.08); }
.badge-info { color: var(--info); border-color: rgba(58,110,165,0.25); background: rgba(58,110,165,0.08); }

/* 表单 */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(45,71,57,0.5);
  box-shadow: 0 0 0 3px rgba(45,71,57,0.08);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236b6b66' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 14px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--cyan); }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--r-md); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  background: #fafaf8;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--hairline); color: var(--text); vertical-align: middle; background: #fff; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .15s ease; }
table.data tbody tr:hover { background: #f7f7f4; }
.table-empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* 工具类 */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 20px; }
.wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 20px; } .mt-5 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 20px; } .mb-5 { margin-bottom: 32px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.text-right { text-align: right; }
.mono { font-family: var(--mono); }
.divider { height: 1px; background: var(--hairline); margin: var(--sp-4) 0; }
.kbd { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border: 1px solid var(--hairline); border-radius: 6px; background: #fff; }

/* Flash 消息 */
.flash { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 13.5px; border: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.flash-success { color: var(--ok); background: rgba(61,139,94,0.06); border-color: rgba(61,139,94,0.2); }
.flash-error { color: var(--err); background: rgba(196,69,69,0.06); border-color: rgba(196,69,69,0.2); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); background-clip: padding-box; }

::selection { background: rgba(45,71,57,0.18); color: #151514; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--sp-4); }

/* ===== 购买中心 ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.bento-cell { min-width: 0; }
.bento-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--grad-accent);
  box-shadow: none;
  transition: width 0.4s ease;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 26px 0 12px;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding: 5px 0 5px 22px;
  position: relative;
}
.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ok);
  font-size: 12px;
}
.plan-card { transition: border-color 0.2s ease, transform 0.2s ease; }
.plan-card:hover { border-color: rgba(45,71,57,0.35); transform: translateY(-2px); }
.plan-current { border-color: rgba(61,139,94,0.4); }
.spinner {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(45,71,57,0.15);
  border-top-color: var(--cyan);
  animation: msw-spin 0.9s linear infinite;
}
@keyframes msw-spin { to { transform: rotate(360deg); } }

/* ===== 注册页套餐选择 ===== */
.plan-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-pick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: border-color 0.15s ease;
}
.plan-pick-item:hover { border-color: rgba(45,71,57,0.4); }
.plan-pick-item input { accent-color: #2d4739; }

/* ===== 开关按钮（浅底版） ===== */
.switch-label { user-select: none; }
.switch {
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--hairline);
  transition: background .2s ease, border-color .2s ease;
  flex-shrink: 0;
}
.switch-knob {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  margin-left: 1px;
  transition: transform .2s ease, background .2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.switch-label input:checked ~ .switch {
  background: rgba(45,71,57,0.3);
  border-color: rgba(45,71,57,0.5);
}
.switch-label input:checked ~ .switch .switch-knob {
  transform: translateX(15px);
  background: var(--cyan);
}

/* ===== 员工管理 ===== */
.dept-list { display: flex; flex-direction: column; gap: 8px; }
.dept-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: #fff;
  font-size: 13px;
}
.emp-form input, .emp-form select { font-size: 13px; }
