/* =============================================================
 * styles.css — CRM 管理系统样式（浅色主题）
 * ============================================================= */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e6e9f0;
  --text: #1f2430;
  --muted: #8b93a7;
  --primary: #4f46e5;
  --primary-soft: #eef0fe;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(31, 36, 48, 0.06);
  --shadow-lg: 0 12px 40px rgba(31, 36, 48, 0.16);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.strike { text-decoration: line-through; color: var(--muted); }
.link { color: var(--primary); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------------- 布局 ---------------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 220px;
  background: #1b1f2a;
  color: #c8ccd8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  padding: 20px 20px 16px;
  letter-spacing: 0.5px;
}
.nav { padding: 8px 12px; flex: 1; }
.nav-group { margin-bottom: 4px; }
.nav-group .nav-item { margin-bottom: 0; }
.nav-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  justify-content: flex-start;
  font-family: inherit;
}
.nav-arrow {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s;
}
.nav-group.expanded .nav-arrow { transform: rotate(0deg); }
.nav-group:not(.expanded) .nav-arrow { transform: rotate(-90deg); }
.sub-nav { display: none; padding: 4px 0 6px 32px; }
.nav-group.expanded .sub-nav { display: block; }
.sub-nav-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: #9aa0b4;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.sub-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sub-nav-item.active { background: rgba(79, 70, 229, 0.35); color: #fff; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #c8ccd8;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.nav-item .ic { width: 18px; text-align: center; opacity: 0.8; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4); }

.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sf-title { font-size: 12px; color: #6b7185; margin-bottom: 8px; }
.link-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #9aa0b4;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.link-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.link-btn.danger:hover { color: #ff8a8a; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.topbar-title { font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.user-btn .user-name { font-weight: 600; }
.user-btn .user-role { font-size: 11px; padding: 2px 6px; border-radius: 10px; color: #fff; }
.user-btn .user-role.role-admin { background: #ef4444; }
.user-btn .user-role.role-sales { background: #0ea5e9; }
.user-btn .ic { font-size: 10px; color: var(--muted); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 180px; display: none; z-index: 50;
}
.user-dropdown.open { display: block; }
.user-dropdown-head { padding: 10px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid #f0f2f7; }
.user-dropdown-foot { padding: 10px 14px; border-top: 1px solid #f0f2f7; }
.user-option {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; padding: 9px 14px; cursor: pointer; font-size: 13px;
}
.user-option:hover { background: #fafbff; }
.user-option.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.user-option-role { font-size: 11px; color: var(--muted); }

/* 角色徽章配色（三级） */
.user-role.role-leader { background: #0ea5e9; }
.user-role.role-member { background: #64748b; }
.role-badge.role-leader { background: #0ea5e9; }
.role-badge.role-member { background: #64748b; }

.btn-block { width: 100%; justify-content: center; }

/* ---------------- 登录面板 ---------------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1b1f2a 0%, #2d3344 100%);
}
.login-overlay.open { display: flex; }
.login-card {
  width: 360px; max-width: 90vw;
  background: #fff; border-radius: 16px;
  padding: 32px 30px 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.login-brand { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; }
.login-card h2 { margin: 14px 0 4px; font-size: 22px; }
.login-card .muted { margin: 0 0 18px; font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form label { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 8px; }
.login-form .f-input { padding: 10px 12px; font-size: 14px; }
.login-error { color: var(--danger); font-size: 12.5px; min-height: 16px; margin-top: 8px; }
.login-hint {
  margin-top: 16px; padding: 10px 12px; border-radius: 10px;
  background: var(--primary-soft); color: #4f46e5;
  font-size: 12px; line-height: 1.6;
}

.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ---------------- 页面通用 ---------------- */
.page { max-width: 1180px; margin: 0 auto; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 22px; margin: 0; }
.page-head .muted { margin: 4px 0 0; font-size: 13px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 16px; }

/* ---------------- 按钮 ---------------- */
.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.btn:hover { border-color: #c9cedb; background: #fafbff; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.btn-text:hover { text-decoration: underline; }
.btn-text.danger { color: var(--danger); }
.btn-text.primary { color: var(--primary); }
.row-actions { white-space: nowrap; }

/* ---------------- 统计卡片 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; margin: 8px 0 4px; }
.stat-sub { color: var(--muted); font-size: 12px; }

/* ---------------- 仪表盘 ---------------- */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 80px 1fr 110px; align-items: center; gap: 10px; }
.bar-label { font-size: 13px; color: #444b5c; }
.bar-track { background: #eef0f5; border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; transition: width 0.4s; }
.bar-value { font-size: 13px; text-align: right; color: #444b5c; font-variant-numeric: tabular-nums; }

/* ---- 转化漏斗 ---- */
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel-bar {
  display: flex;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef0f5;
}
.funnel-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: width 0.4s;
}
.funnel-new { background: #22c55e; }
.funnel-abc { background: #4f46e5; }
.funnel-legend {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.legend-item { display: flex; align-items: center; gap: 6px; color: #444b5c; }
.legend-item strong { font-weight: 700; }

/* ---- 趋势图 ---- */
.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding: 8px 0;
  overflow-x: auto;
}
.trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 36px;
  height: 100%;
  justify-content: flex-end;
}
.trend-bar {
  width: 100%;
  max-width: 32px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height 0.3s;
  display: flex;
  justify-content: center;
}
.dual-bar {
  display: flex;
  gap: 3px;
  width: 100%;
  max-width: 40px;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
}
.dual-bar .trend-bar { max-width: 16px; }
.trend-val {
  position: absolute;
  top: -18px;
  font-size: 11px;
  font-weight: 600;
  color: #444b5c;
}
.trend-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
}
.trend-summary {
  margin-top: 10px;
  font-size: 13px;
  color: #444b5c;
  padding: 8px 0;
}
.tag-legend {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 13px;
}

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f2f7; cursor: pointer; }
.mini-row:last-child { border-bottom: none; }
.mini-row:hover { background: #fafbff; }
.mini-title { font-weight: 500; }
.mini-sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.empty-mini { color: var(--muted); padding: 10px 0; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd2e0; flex-shrink: 0; }
.status-dot.done { background: #34d399; }
.status-dot.overdue { background: var(--danger); }

/* ---------------- 工具栏 / 表格 ---------------- */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.search {
  flex: 1;
  max-width: 360px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  outline: none;
}
.search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
/* ---------------- 品牌快捷录入（新增客户） ---------------- */
.brand-import { padding: 16px 18px; }
.brand-import-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
}
.brand-import-col { display: flex; flex-direction: column; gap: 8px; }
.brand-import-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.brand-import-row { display: flex; gap: 8px; }
.brand-import-row .search { flex: 1; max-width: none; }
.brand-import-hint { font-size: 12px; color: var(--muted); }
.brand-import-col textarea {
  width: 100%;
  resize: vertical;
  min-height: 64px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.brand-import-col textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.brand-import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tabs { display: flex; gap: 6px; }
.tab {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 1680px; }
.table th, .table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid #f0f2f7; }
.table th { background: #fafbff; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.3px; white-space: nowrap; vertical-align: bottom; }
.table td { vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbff; }
.nowrap { white-space: nowrap; }
.done-row { opacity: 0.7; }
.overdue-text { color: var(--danger); font-weight: 600; }

.badge {
  display: inline-block;
  color: #fff;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.role-badge.role-admin { background: #ef4444; }
.role-badge.role-sales { background: #0ea5e9; }
.tag-badge { margin-left: 4px; }
.tag-head-brand { background: #7c3aed; }
.tag-meet { background: #0ea5e9; }
.tag-signed { background: #16a34a; }

/* 客户列表：微信/支付宝验证单元格（可点击切换） */
.verify-cell {
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.1s;
}
.verify-cell:hover { background: #eef2ff; }
.verify-cell:active { transform: scale(0.85); }

/* 客户列表：等级单元格（点击出现下拉选择） */
.level-cell { cursor: pointer; }
.level-badge:hover { opacity: 0.85; }
.level-select {
  border: 1px solid #c7d2fe;
  border-radius: 20px;
  background: #fff;
  color: #1e293b;
  font-weight: 600;
  font-size: 12px;
  padding: 2px 6px;
  outline: none;
  cursor: pointer;
}

/* ---------------- 编辑客户：联系人编辑器 ---------------- */
.contact-editor {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.contact-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.contact-editor-head h4 {
  margin: 0;
  font-size: 15px;
  color: #1e293b;
}
.contact-editor-help {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}
.contact-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1.4fr 90px 90px 32px;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}
.contact-row .f-input,
.contact-row select.f-input {
  padding: 8px 10px;
  font-size: 13px;
  min-height: 36px;
  height: 100%;
}
.contact-row-head {
  margin-bottom: 6px;
  padding: 0;
}
.contact-row-head span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px;
}
.contact-row .ct-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  align-self: center;
  justify-self: center;
}

/* 客户列表：多个联系人并列/堆叠显示 */
.contact-stack-cell {
  vertical-align: top;
  padding-top: 10px;
  padding-bottom: 10px;
}
.stack-line {
  display: block;
  line-height: 1.5;
}

/* 表格内联编辑单元格 */
.inline-edit {
  display: inline-block;
  min-width: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: text;
  transition: background 0.12s, outline 0.12s;
  outline: 1px dashed transparent;
  outline-offset: 0;
  word-break: break-all;
}
.inline-edit:hover {
  background: #eef2ff;
  outline-color: #c7d2fe;
}
.inline-edit.empty {
  color: #b6bccb;
  border: 1px dashed #d7dbe6;
  background: #fafbfd;
}
.inline-edit.empty:hover {
  background: #fff7e6;
  border-color: #fbbf24;
  color: #b45309;
}
.inline-edit-input {
  width: 100%;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 3px 6px;
  font: inherit;
  color: inherit;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ---------------- 看板 ---------------- */
.kanban {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.kanban-col {
  min-width: 250px;
  width: 250px;
  background: #f7f8fc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: background 0.15s, box-shadow 0.15s;
}
.kanban-col.drag-over { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.kanban-col-head {
  padding: 12px 14px;
  border-top: 3px solid var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.col-title { font-weight: 600; font-size: 13px; }
.col-sum { font-size: 12px; color: var(--muted); }
.kanban-col-body { padding: 10px; min-height: 60px; display: flex; flex-direction: column; gap: 10px; }
.col-empty { color: #b6bccb; font-size: 12px; text-align: center; padding: 14px 0; border: 1px dashed #d7dbe6; border-radius: 8px; }

.deal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 9px;
  padding: 12px;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(31, 36, 48, 0.05);
}
.deal-card:hover { box-shadow: var(--shadow); }
.deal-card.dragging { opacity: 0.5; }
.deal-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.deal-meta { color: var(--muted); font-size: 12px; }
.deal-amount { font-weight: 700; color: var(--primary); margin: 8px 0; font-variant-numeric: tabular-nums; }
.deal-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }

/* ---------------- 表单 ---------------- */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #444b5c; margin-bottom: 6px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.f-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.readonly-box { padding: 9px 12px; background: #f4f6fb; border-radius: 9px; color: #444b5c; }

/* 客户表单：标签复选 */
.tag-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-check {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; user-select: none;
}
.tag-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.tag-check:hover { border-color: #c9cedb; background: #fafbff; }

/* 客户列表：标签切换单元格 */
.tag-toggle { text-align: center; }

/* ---------------- 详情弹窗 ---------------- */
.detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-bottom: 14px; }
.detail-grid > div { display: flex; gap: 8px; font-size: 13px; }
.detail-grid .k { color: var(--muted); min-width: 48px; }
.detail-grid .v { color: var(--text); }
.detail-remark { background: #f7f8fc; border-radius: 9px; padding: 12px; font-size: 13px; margin-bottom: 14px; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.detail-sub { margin: 18px 0 8px; font-size: 14px; }

/* ---------------- 模态框 ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 35, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s ease;
}
.modal-lg { max-width: 760px; }
@keyframes pop { from { transform: translateY(-8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px; max-height: 64vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.confirm-msg { margin: 0; line-height: 1.6; color: #444b5c; }

/* ---------------- Toast ---------------- */
.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.toast {
  background: #1f2430;
  color: #fff;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
}
.toast.show { opacity: 1; transform: none; }
.toast.success { background: #16a34a; }
.toast.warn { background: #d97706; }
.toast.info { background: #1f2430; }

.check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid #c9cedb;
  background: #fff;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.check.checked { background: #16a34a; border-color: #16a34a; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 920px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .sidebar { width: 64px; }
  .brand { font-size: 0; padding: 18px 0; text-align: center; }
  .brand::before { content: 'C'; font-size: 22px; color: #fff; font-weight: 700; }
  .nav-item span:not(.ic) { display: none; }
  .nav-item { justify-content: center; }
  .sidebar-foot .sf-title, .link-btn { font-size: 0; }
  .sidebar-foot .link-btn::first-letter { font-size: 16px; }
}
