:root {
  --bg: #F2F3F5;
  --panel: #FFFFFF;
  --panel-2: #F7F8FA;
  --line: #E5E8EF;
  --text: #1F2329;
  --text-2: #4E5969;
  --text-3: #86909C;
  --primary: #1677FF;
  --primary-hover: #4096FF;
  --primary-weak: #E8F3FF;
  --success: #00B42A;
  --success-weak: #E8FFEA;
  --success-text: #009A29;
  --danger: #F53F3F;
  --danger-weak: #FFECE8;
  --warn: #FF7D00;
  --warn-weak: #FFF7E8;
  --sidebar: #10203A;
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --radius: 10px;
  --shadow: 0 6px 24px rgba(14, 34, 66, 0.08);
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  /* åªè®¾æœ€å°é«˜åº¦ï¼šbody é«˜åº¦éšå†…å®¹å¢žé•¿ï¼Œé¿å…æ»šåŠ¨åˆ°åº•éƒ¨æ—¶ sticky å¤´éƒ¨è¢«å®¹å™¨é«˜åº¦æˆªæ–­è€Œâ€œæ’‘ç ´â€ */
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: 0 0 auto;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.appbar-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
/* logo åŒºèƒŒæ™¯ï¼šå®½åº¦ = ä¸€çº§èœå• 92 + äºŒçº§èœå• 186ï¼Œä¸Žå·¦ä¾§å¯¼èˆªè¿žæˆä¸€ç‰‡ */
.appbar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: -1px;
  width: 278px;
  background: var(--sidebar);
}
.appbar-brand .brand-text strong { color: #EAF1FB; font-size: 13px; }
.appbar-brand .brand-text span { color: rgba(233, 241, 251, 0.45); }
@media (max-width: 900px) {
  .appbar::before { display: none; }
  .appbar-brand .brand-text strong { color: var(--text); }
  .appbar-brand .brand-text span { color: var(--text-3); }
}
.appbar-right { display: flex; align-items: center; gap: 14px; }
.org-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  z-index: 1;
  /* H1 å·¦è¾¹è· = ä¾§æ  92 + å†…å®¹å†…è¾¹è· 24ï¼›äºŒçº§èœå•å±•å¼€æ—¶å† +186 */
  left: 116px;
  transition: left 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.subnav-open .org-switch { left: 302px; }
.org-switch select {
  height: 30px;
  max-width: 190px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.org-switch select:focus { border-color: var(--primary); }
@media (max-width: 900px) {
  .org-switch { display: none; }
}

.layout { display: flex; min-height: calc(100vh - 52px); }

.sidebar {
  width: 92px;
  flex: 0 0 92px;
  background: var(--sidebar);
  color: #B9C7DB;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  z-index: 40;
}

/* äºŒçº§èœå•é¢æ¿ï¼šä»Žå·¦ä¾§æŽ¨å‡ºï¼Œå®½åº¦å˜åŒ–å¸¦åŠ¨å³ä¾§å†…å®¹æ”¶ç¼© */
.subnav {
  width: 0;
  flex: 0 0 0;
  overflow: hidden;
  background: #0C1A2F;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  z-index: 39;
  transition: width 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), flex-basis 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.subnav.open { width: 186px; flex-basis: 186px; }
.subnav-inner {
  width: 186px;
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 8px;
  transform: translateX(-14px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.18s ease;
}
.subnav.open .subnav-inner {
  transform: translateX(0);
  opacity: 1;
  transition-delay: 0.03s;
}
.subnav-head {
  padding: 2px 18px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #E6EEF9;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: #fff; font-size: 13px; font-weight: 600; }
.brand-text span { font-size: 9px; letter-spacing: 1.2px; color: #6E8199; }

.nav { flex: 1; overflow-y: auto; padding: 10px 0; }

/* ä¸€çº§æ¿å—ï¼šçª„æ ç«–æŽ’ï¼Œç‚¹å‡»å±•å¼€å³ä¾§äºŒçº§é¢æ¿ */
.nav-parent {
  position: relative;
  width: calc(100% - 12px);
  margin: 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 4px 13px;
  border: none;
  border-radius: 8px;
  background: none;
  color: #8FA2BB;
  font-size: 11.5px;
  line-height: 1.25;
  letter-spacing: 0.2px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.16s, color 0.16s;
}
.nav-parent:hover { background: rgba(255, 255, 255, 0.05); color: #DCE7F5; }
.nav-parent.active { background: rgba(255, 255, 255, 0.08); color: #fff; font-weight: 600; }
.nav-parent.has-active { color: #DCE7F5; }
.nav-parent-label { white-space: nowrap; }
.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav-parent.active .nav-icon { color: #fff; }
.nav-group.has-active .nav-parent { color: #E6EEF9; }
/* ä¸€çº§èœå•åº•éƒ¨æŠ˜å æŒ‰é’®ï¼šä¸Žä¸€çº§èœå•åŒæ ·å¼ */
.nav-toggle {
  flex: 0 0 auto;
  margin: 6px 6px 14px;
  padding: 13px 4px 11px;
  color: #7F93AC;
}
.nav-toggle:hover { color: #DCE7F5; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  margin: 2px 10px;
  border-radius: 8px;
  color: #9AABC4;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 500; }
.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
.nav-step {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.85);
}
.nav-item.active .nav-step {
  background: var(--primary);
  color: #fff;
}
/* é£žè½®é©¾é©¶èˆ± */
.fw-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.fw-step {
  display: block;
  padding: 14px;
  border-radius: 10px;
  background: #f7f9fc;
  border: 1px solid #e8eef7;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, transform 0.14s;
}
.fw-step:hover {
  border-color: var(--primary);
  background: #fff;
  transform: translateY(-1px);
}
.fw-step.warn {
  background: #fff7f0;
  border-color: #ffd9b8;
}
.fw-idx {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.fw-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d2129;
}
.fw-val {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  color: #1d2129;
  font-variant-numeric: tabular-nums;
}
.fw-val small {
  font-size: 11px;
  font-weight: 400;
  color: #86909c;
  margin-left: 3px;
}
.fw-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #86909c;
  line-height: 1.4;
}
.fw-next {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #eef4ff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.fw-next span {
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
}
.fw-next b {
  font-weight: 500;
  color: #1d2129;
}
.fw-next-btn {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  flex-shrink: 0;
}
.fw-next-btn:hover {
  opacity: 0.9;
}
@media (max-width: 1280px) {
  .fw-track { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .fw-track { grid-template-columns: 1fr 1fr; }
}
.nav-count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count { background: rgba(0, 0, 0, 0.18); }

.sidebar-foot {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--sidebar-line);
}
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-weak);
  color: var(--primary);
}
.mode-badge.live { background: var(--warn-weak); color: var(--warn); }
.mode-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

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

.topbar {
  position: sticky;
  top: 52px;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.topbar .sub { margin: 3px 0 0; font-size: 12px; color: var(--text-3); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.view { padding: 20px 24px 48px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s, background 0.14s;
}
.btn:hover { border-color: #CBD3CE; background: var(--panel-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.ghost-danger { color: var(--danger); border-color: #F0C6C1; background: #fff; }
.btn.ghost-danger:hover { background: var(--danger-weak); }

input[type="date"],
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { height: auto; padding: 8px 10px; resize: vertical; }

.date-range { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.date-range input[type="date"] { height: 32px; }

.seg {
  display: inline-flex;
  background: #EDF1F8;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.seg button.active { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07); }

/* ---------- cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.card-title { font-size: 14px; font-weight: 600; }
.card-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

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

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 20px;
}
.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}
.detail-grid span {
  font-size: 11px;
  color: #86909c;
}
.detail-grid b {
  font-weight: 600;
  color: #1d2129;
  font-variant-numeric: tabular-nums;
}
.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.upload-row input[type='file'] {
  font-size: 12px;
  color: var(--text-2);
}
.pf-row {
  cursor: pointer;
}
.pf-row:hover td {
  background: #f2f7ff;
}

/* ---------- kpi ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 15px;
}
.kpi-label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi-value {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }
.kpi-foot { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.kpi-foot b { color: var(--text-2); font-weight: 500; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-2);
  padding: 10px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #FAFCFF; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .name { font-weight: 500; }
.table .muted { color: var(--text-3); font-size: 13px; }
.table .badge { font-size: 12px; }

.bar {
  display: inline-block;
  width: 68px;
  height: 6px;
  background: #EDF2FA;
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 7px;
}
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge.neutral { background: #F0F3F9; color: var(--text-2); }
.badge.success { background: var(--success-weak); color: var(--success-text); }
.badge.danger { background: var(--danger-weak); color: #B91C1C; }
.badge.warn { background: var(--warn-weak); color: #B45309; }
.badge.tag { background: #F2F5FA; color: var(--text-2); font-weight: 400; }

/* ---------- alerts ---------- */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.alert-item:last-child { border-bottom: none; }
.alert-bar { width: 3px; border-radius: 3px; background: var(--danger); align-self: stretch; flex: 0 0 3px; }
.alert-bar.mid { background: var(--warn); }
.alert-main { flex: 1; min-width: 0; }
.alert-title { font-weight: 500; font-size: 13px; }
.alert-text { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- attribution ---------- */
.attr-row { display: grid; grid-template-columns: 96px 1fr 78px 66px; align-items: center; gap: 12px; padding: 9px 0; }
.attr-key { font-size: 12px; color: var(--text-2); }
.attr-track { height: 20px; background: #F3F7FD; border-radius: 6px; overflow: hidden; position: relative; }
.attr-fill { height: 100%; background: var(--primary); border-radius: 6px; transition: width 0.25s; }
.attr-fill.low { background: var(--danger); }
.attr-fill.mid { background: var(--warn); }
.attr-value { font-size: 12px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.attr-meta { font-size: 11px; color: var(--text-3); text-align: right; }

.conclusion {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 13px;
  line-height: 1.6;
}
.conclusion + .conclusion { margin-top: 8px; }
.conclusion .mark { flex: 0 0 6px; width: 6px; border-radius: 3px; background: var(--text-3); }
.conclusion.good .mark { background: var(--primary); }
.conclusion.bad .mark { background: var(--danger); }
.conclusion.warn .mark { background: var(--warn); }

/* ---------- leads ---------- */
.lead-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.lead-item:last-child { border-bottom: none; }
.lead-item:hover { background: #FAFCFF; }
.lead-who { font-weight: 500; font-size: 13px; }
.lead-phone { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lead-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 0 7px;
  font-family: inherit;
  text-decoration: none;
}
.lead-cell .link-btn { padding-left: 0; }
.link-btn:hover { text-decoration: underline; }
.lead-attr { min-width: 0; }
.lead-source { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text); min-width: 0; }
.lead-creative {
  font-weight: 500;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-ids {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.lead-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.lead-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.lead-actions { display: flex; gap: 6px; }

.empty { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- report ---------- */
.report-hero {
  background: #0E1B33;
  border-radius: var(--radius);
  padding: 22px 24px;
  color: #E6EEFA;
  margin-bottom: 16px;
}
.report-hero h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.report-hero p { margin: 0; font-size: 12px; color: #8FA3BF; }
.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 18px; }
.report-stat span { font-size: 11px; color: #8FA3BF; display: block; }
.report-stat strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.report-stat em { font-style: normal; font-size: 11px; margin-left: 6px; }
.up { color: #4ADE80; }
.down { color: #F87171; }

.action-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}
.action-item:last-child { border-bottom: none; }
.action-p {
  flex: 0 0 30px;
  height: 20px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--danger-weak);
  color: var(--danger);
  margin-top: 1px;
}
.action-p.p1 { background: var(--warn-weak); color: var(--warn); }
.action-p.p2 { background: #EDF1F8; color: var(--text-2); }

/* ---------- settings ---------- */
.form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.form-row:last-child { border-bottom: none; }
.form-label { font-size: 13px; }
.form-label span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.form-control { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-control input[type="number"], .form-control input[type="text"], .form-control input[type="password"] { width: 220px; }
.hint { font-size: 11px; color: var(--text-3); }
.cb-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--text-2);
  word-break: break-all;
}

.switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute;
  inset: 0;
  background: #D8E1EF;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s;
}
.switch span::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.16s;
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(17px); }

/* ---------- modal / toast ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(11, 21, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  /* éœ€é«˜äºŽå³ä¾§è¯¦æƒ…æŠ½å±‰ï¼ˆ81ï¼‰ï¼Œå¦åˆ™ç¡®è®¤æŒ‰é’®ä¼šè¢«æŠ½å±‰ç›–ä½ */
  z-index: 90;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  animation: modalIn 0.16s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.modal-body { padding: 18px 20px; max-height: 60vh; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.reason-list { display: grid; gap: 7px; }
.reason-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.reason-item:hover { border-color: #B9D9C8; background: var(--panel-2); }
.reason-item.selected { border-color: var(--primary); background: var(--primary-weak); }
.reason-name { font-size: 13px; }
.reason-hint { font-size: 11px; color: var(--text-3); text-align: right; }

.toast-root { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast {
  background: #0E1B33;
  color: #fff;
  padding: 10px 15px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  animation: toastIn 0.18s ease-out;
  max-width: 360px;
}
.toast.error { background: #8C2A21; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- auth ---------- */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(104deg, rgba(4, 11, 26, 0.9) 0%, rgba(6, 20, 46, 0.64) 52%, rgba(8, 28, 62, 0.34) 100%),
    url("https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=futuristic%20AI%20robot%20head%20with%20glowing%20blue%20neural%20circuit%20patterns%2C%20holographic%20data%20particles%2C%20dark%20navy%20sci-fi%20background%2C%20cinematic%20rim%20lighting%2C%20ultra%20detailed%2C%20no%20text&image_size=landscape_16_9")
      center / cover no-repeat fixed,
    #050d1c;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 48px clamp(24px, 12vw, 240px) 48px clamp(24px, 5.5vw, 96px);
}

.auth-hero { max-width: 780px; margin-right: auto; color: #E8F1FF; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 156, 255, 0.35);
  background: rgba(22, 62, 122, 0.28);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #7FB6FF;
}
.hero-title {
  margin: 20px 0 14px;
  /* æ ‡é¢˜å›ºå®šå•è¡Œï¼šéšè§†å£æ”¶çª„å­—å·ï¼Œé¿å…æ¢è¡Œ */
  font-size: clamp(22px, calc(5.1vw - 28px), 40px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.6px;
  white-space: nowrap;
}
.hero-desc {
  margin: 0;
  max-width: 480px;
  font-size: 14px;
  line-height: 1.85;
  color: #9FB6D6;
}
.hero-points { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 34px; }
.hero-point b { display: block; font-size: 17px; font-weight: 600; color: #EAF3FF; }
.hero-point span { display: block; margin-top: 4px; font-size: 12px; color: #7E96B6; }

.auth-panel { flex: 0 0 392px; max-width: 392px; width: 100%; }
.auth-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  padding: 32px 30px 38px;
  box-shadow: 0 30px 80px rgba(2, 10, 26, 0.55), 0 0 0 1px rgba(120, 170, 255, 0.18);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-brand .brand-text strong { color: var(--text); font-size: 14px; }
.auth-brand .brand-text span { color: var(--text-3); }
.auth-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.auth-sub { margin: 4px 0 20px; font-size: 12px; color: var(--text-3); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: 12px; color: var(--text-2); }
.auth-field input { height: 38px; width: 100%; }
.auth-error {
  min-height: 18px;
  font-size: 12px;
  color: var(--danger);
  opacity: 0;
  transition: opacity 0.15s;
}
.auth-submit { height: 40px; width: 100%; font-size: 14px; }

@media (max-width: 960px) {
  .auth-layout { justify-content: center; padding: 24px; }
  .auth-hero { display: none; }
  .auth-panel { flex: 0 1 392px; }
}

/* ---------- topbar user menu ---------- */
.user-menu { position: relative; }
.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 11px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.14s, background 0.14s;
}
.user-trigger:hover { border-color: #BBD0F0; background: var(--primary-weak); }
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 26px;
}
.user-name { font-size: 12px; font-weight: 500; color: var(--text); }
.user-caret { color: var(--text-3); display: flex; transition: transform 0.16s; }
.user-menu.open .user-caret { transform: rotate(180deg); }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 176px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(14, 34, 66, 0.14);
  padding: 6px;
  z-index: 70;
}
.user-dropdown[hidden] { display: none; }
.user-dropdown-head { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-dropdown-head strong { display: block; font-size: 12px; color: var(--text); font-weight: 600; }
.user-dropdown-head span { font-size: 11px; color: var(--text-3); }
.user-dropdown-item {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.user-dropdown-item:hover { background: var(--panel-2); }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger:hover { background: var(--danger-weak); }
.dropdown-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* é¡µå†… tab åˆ‡æ¢ï¼ˆå¹³å°æŽ¥å…¥ä¸Žé˜ˆå€¼åˆå¹¶é¡µï¼‰ */
.page-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.page-tab {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 18px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.page-tab:hover { color: var(--primary); }
.page-tab.active { background: #EAF2FF; color: var(--primary); font-weight: 600; }

/* å……å€¼ç®¡ç†ï¼šæ­¥éª¤ä¸Žå¾…æ‰“æ¬¾å• */
.charge-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.charge-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}
.charge-step b {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #EAF2FF;
  color: var(--primary);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.charge-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #FBFDFF;
}
.cp-main span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.cp-main b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cp-main em { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.cp-code { display: flex; align-items: center; gap: 10px; }
.cp-code span { font-size: 11px; color: var(--text-3); }
.cp-code b { font-size: 15px; letter-spacing: 1px; }
@media (max-width: 980px) {
  .charge-steps { grid-template-columns: 1fr; }
}

/* è´¦å·å®‰å…¨æŠ½å±‰ */
#acctDrawer { width: min(420px, 94vw); }
.acct-field { margin-bottom: 14px; }
.acct-field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.acct-field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}
.acct-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}
.acct-field .hint { display: block; margin-top: 5px; }
.acct-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }

/* å…¨å±€å³ä¸‹è§’æ‚¬æµ®åŒæ­¥æŒ‰é’® */
.sync-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1677FF, #0E5FD8);
  color: #fff;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.36);
  transition: transform 0.16s, box-shadow 0.16s;
}
.sync-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(22, 119, 255, 0.42); }
.sync-fab:active { transform: translateY(0); }
.sync-fab svg { width: 22px; height: 22px; }
.sync-fab[disabled] { cursor: default; opacity: 0.85; }
.sync-fab.syncing svg { animation: sync-spin 1s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }

/* ---------- misc ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mono { font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; font-size: 11px; color: var(--text-3); align-items: center; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.loading { padding: 60px; text-align: center; color: var(--text-3); font-size: 13px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .report-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 8px; }
  .lead-item { grid-template-columns: 1fr; }
}

/* åŒæ­¥çŠ¶æ€ä¸Žå‘Šè­¦ */
.sync-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sync-alert {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; background: var(--warn-weak); color: #B45309;
  border: 1px solid #FCE3B6;
}
.sync-alert.danger { background: var(--danger-weak); color: #B91C1C; border-color: #F7C9C4; }
.sync-alert .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }

.sync-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.sync-row:last-child { border-bottom: none; }
.sync-name { flex: 0 0 160px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.sync-name .muted { font-weight: 400; }
.sync-state {
  flex: 0 0 auto; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: var(--panel-2); color: var(--text-2);
}
.sync-state.ok { background: var(--success-weak); color: var(--success-text); }
.sync-state.danger { background: var(--danger-weak); color: #B91C1C; }
.sync-meta { margin-left: auto; color: var(--text-3); }

/* è´¦æˆ·èµ„é‡‘æŒ‡æ ‡æ¡ */
.fund-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fund-item {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.fund-item span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.fund-item b { font-size: 22px; font-weight: 600; letter-spacing: -0.2px; }
.fund-item em { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 4px; }

@media (max-width: 1180px) {
  .fund-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .fund-strip { grid-template-columns: 1fr; }
}

/* å……å€¼ç®¡ç† */
.charge-form .charge-input {
  width: 100%;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 600;
  height: 46px;
}
.charge-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
}
#chargeErr { margin-top: 8px; min-height: 16px; }
.charge-info-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.charge-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary);
  background: var(--panel-2);
  border: 1px dashed var(--primary);
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
  word-break: break-all;
}
.charge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.charge-grid > div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.charge-grid span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.charge-grid b { font-size: 13px; font-weight: 600; word-break: break-all; }
@media (max-width: 640px) {
  .charge-grid { grid-template-columns: 1fr; }
}

/* äººç¾¤ç®¡ç† */
.aud-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}
.aud-filters select { width: 100%; }
.aud-bar-wrap { display: flex; align-items: center; gap: 8px; width: 150px; }
.aud-bar { height: 6px; background: var(--primary); border-radius: 999px; min-width: 2px; flex: 0 0 auto; }
.aud-bar-wrap span { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.aud-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.aud-metrics > div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.aud-metrics span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.aud-metrics b { font-size: 15px; font-weight: 600; word-break: break-all; }
.json-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.5;
  overflow: auto;
  max-height: 320px;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.table.kv td:first-child { width: 46%; color: var(--text-3); font-size: 12px; }
@media (max-width: 1180px) {
  .aud-filters { grid-template-columns: repeat(2, 1fr); }
  .aud-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* çª„å±ä¸‹äºŒçº§èœå•æ”¹ä¸ºæµ®å±‚ï¼Œé¿å…åŽ‹ç¼©å†…å®¹åŒº */
@media (max-width: 980px) {
  .subnav {
    position: fixed;
    left: 92px;
    top: 52px;
    height: calc(100vh - 52px);
    box-shadow: 12px 0 30px rgba(6, 16, 32, 0.28);
  }
  .subnav.open { width: 186px; flex-basis: 186px; }
}

/* ---------- æ•°æ®çœ‹æ¿ ---------- */
.dash-kpis { grid-template-columns: repeat(3, 1fr); }
.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-row-21 { grid-template-columns: 2fr 1fr; }
.dash-row > .card { display: flex; flex-direction: column; }
/* åŒä¸€è¡Œå·¦å³å¡ç‰‡é¡¶éƒ¨å¯¹é½ï¼ŒåŽ»æŽ‰ .card + .card çš„é»˜è®¤ä¸Šé—´è· */
.dash-row > .card + .card { margin-top: 0; }
.dash-row > .card > .card-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.dash-chart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 8px; }
.dash-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dash-val { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.dash-bar-track {
  flex: 1;
  width: 100%;
  max-width: 48px;
  display: flex;
  align-items: flex-end;
  background: var(--panel-2);
  border-radius: 6px;
  overflow: hidden;
}
.dash-bar-fill {
  width: 100%;
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #7CB0FF, var(--primary));
  transition: height 0.4s ease;
}
.dash-date { font-size: 10px; color: var(--text-3); }
.dash-stack {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel-2);
  margin: 6px 0 12px;
}
.dash-stack span { display: block; height: 100%; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dash-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.dash-facts > div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.dash-facts span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.dash-facts b { font-size: 15px; }
.dash-modules { display: flex; flex-direction: column; gap: 10px; }
.dash-module {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.16s, transform 0.16s;
}
.dash-module:hover { border-color: var(--primary); transform: translateY(-1px); }
.dm-name { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.dash-module b { font-size: 18px; font-weight: 600; }
.dash-module b small { font-size: 11px; font-weight: 400; color: var(--text-3); }
.dash-module em { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 6px; }
@media (max-width: 1180px) {
  .dash-row,
  .dash-row-21 { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* çŽ¯å½¢å›¾ */
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-svg { width: 168px; height: 168px; flex: 0 0 auto; }
.donut-value { font-size: 22px; font-weight: 700; fill: #1D2129; }
.donut-label { font-size: 11px; fill: #86909C; }
.donut-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 11px; }
.dl-row {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.dl-row .dot { margin-right: 0; }
.dl-row b { font-size: 13px; color: var(--text-1); font-variant-numeric: tabular-nums; }
.dl-row em { font-style: normal; color: var(--text-3); min-width: 46px; text-align: right; }

/* é¢ç§¯æ›²çº¿å›¾ */
.area-svg { width: 100%; height: auto; display: block; }
.axis-text { font-size: 10px; fill: #86909C; }

/* æ¨ªå‘æ¡å½¢å›¾ */
.hbar-list { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.hbar-row {
  display: grid;
  grid-template-columns: minmax(70px, 150px) 1fr auto;
  align-items: center;
  gap: 10px;
}
.hbar-label {
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbar-track { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7CB0FF, #1677FF); }
.hbar-value { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* å³çª„æ å†…åŽ‹ç¼©è®¡åˆ’åå®½åº¦ï¼Œä¿è¯æ¡å½¢ä¸Žæ•°å€¼å¯è¯» */
.dash-row-21 .hbar-row { grid-template-columns: minmax(56px, 96px) 1fr auto; }

/* çœçº§çƒ­åŠ›åœ°å›¾ */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.8fr); gap: 20px; align-items: center; }
.china-map { width: 100%; height: auto; max-height: 430px; display: block; }
.china-map path { transition: fill 0.2s, stroke 0.2s; }
.china-map path:hover { stroke: #1677FF; stroke-width: 1.6; }
.map-side-title { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.map-rank {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.map-rank:last-child { border-bottom: 0; }
.map-rank span { color: var(--text-2); }
.map-rank b { font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) {
  .map-wrap { grid-template-columns: 1fr; }
}

/* çº¿ç´¢åˆ—è¡¨ï¼šå¤šæ¡ä»¶æŸ¥è¯¢ + æ¨ªå‘å±žæ€§åˆ— */
.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}
.filter-field span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.filter-field input { width: 100%; }
.filter-actions { display: flex; gap: 8px; }

.lead-list-head { align-items: center; }
.lead-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: #F1F4F9;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.lead-tabs button {
  border: none;
  background: transparent;
  color: var(--text-2);
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.lead-tabs button b {
  font-size: 11px;
  font-weight: 600;
  opacity: 1;
  color: var(--text-3);
  background: rgba(15, 29, 50, 0.06);
  padding: 1px 7px;
  border-radius: 999px;
}
.lead-tabs button:hover { background: rgba(255, 255, 255, 0.7); color: var(--primary); }
.lead-tabs button.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 29, 50, 0.14), 0 1px 2px rgba(15, 29, 50, 0.08);
}
.lead-tabs button.active b { background: #E8F1FF; color: var(--primary); }

/* çº¿ç´¢ç‹¬ç«‹æŸ¥è¯¢é¡¹ï¼š4 ä¸ªè¾“å…¥ä¸€è¡Œï¼Œæ—¥æœŸä¸Žæ“ä½œç¬¬äºŒè¡Œ */
.lead-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.lead-head,
.lead-row2 {
  display: grid;
  grid-template-columns: 2.1fr 1.4fr 1.9fr 1.7fr 1.5fr 1.05fr 1.1fr 300px;
  gap: 14px;
  align-items: center;
  padding: 11px 20px;
}
.lead-head {
  font-size: 13px;
  color: var(--text-3);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.lead-row2 { border-bottom: 1px solid var(--line); font-size: 13px; }
.lead-row2:last-child { border-bottom: none; }
.lead-row2:hover { background: #FAFBFD; }
.lead-cell { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-cell.muted { color: var(--text-3); }
.lead-person { display: flex; align-items: center; gap: 10px; }
.lead-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #ECEFF4;
  color: #8A94A6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}
.lead-avatar.photo { background: #E8F3FF; }
.lead-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lead-person-main { min-width: 0; }
.lead-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-actions { justify-content: flex-end; flex-wrap: nowrap; }
.mat-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-right: 8px;
  background: var(--panel-2);
}
.mat-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mat-gallery a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
}
.mat-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
/* è®¡åˆ’ newï¼šç´ æ TOP5 */
.plan-mat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.plan-mat-row:last-child {
  border-bottom: none;
}
.plan-mat-name {
  flex: 1;
  min-width: 0;
}
.plan-mat-name .link-btn {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.plan-mat-meta {
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
  white-space: nowrap;
  line-height: 1.5;
}
/* é”€å”®æ¼æ–— */
.funnel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0 4px;
}
.funnel-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  transition: width 0.3s ease;
}
.funnel-stage b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.funnel-rate {
  font-size: 12px;
  color: var(--text-3);
  padding: 1px 0;
}
.funnel-rates {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.funnel-rates > div {
  flex: 1;
  min-width: 140px;
  background: var(--panel-2);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.funnel-rates span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 2px;
}
.funnel-rates b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.funnel-tip {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 8px 12px;
}
/* è®¡åˆ’ newï¼šæŠ•æ”¾è¯Šæ–­ */
.pn-stat-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pn-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-2);
}
.pn-stat b {
  font-weight: 600;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.pn-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 10px 0 14px;
}
.pn-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7cb0ff, #1677ff);
}
.pn-progress i.danger {
  background: linear-gradient(90deg, #ffb4b4, #f53f3f);
}
.pn-struct {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.pn-struct-row {
  display: grid;
  grid-template-columns: 130px 1fr 88px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
}
.pn-struct-row .pn-progress {
  margin: 0;
}
.pn-struct-row em {
  font-style: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.pn-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 200px;
}
.pn-tags .badge {
  font-size: 11px;
  padding: 2px 7px;
}
.pn-advice {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}
.pn-advice li {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 9px 10px;
}
.pn-advice li i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--warn);
}
.pn-advice li.danger i {
  background: var(--danger);
}
.pn-advice li.success i {
  background: var(--success);
}
/* çº¿ç´¢è½¬åŒ–ç™»è®° */
.ld-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.ld-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
}
.ld-form label input,
.ld-form label select {
  width: 100%;
}
.ld-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}
/* çº¿ç´¢äººç¾¤ç”»åƒ */
.aud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.aud-block-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.aud-block-title em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-3);
}
.aud-dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
  font-size: 12px;
}
.aud-dist-name {
  width: 72px;
  flex: 0 0 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-2);
}
.aud-dist-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}
.aud-dist-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.aud-dist-val {
  width: 44px;
  text-align: right;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1300px) {
  .lead-head,
  .lead-row2 { grid-template-columns: 2fr 1.3fr 1.6fr 1.5fr 1.3fr 1fr 1fr 280px; gap: 10px; }
}
@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .lead-head { display: none; }
  .lead-row2 { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .lead-actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* è®¡åˆ’åˆ—è¡¨å³ä¾§æ“ä½œ + è¯¦æƒ…æŠ½å±‰ */
.pf-row { cursor: pointer; }
td.row-ops { text-align: right; white-space: nowrap; }
td.row-ops .link-btn + .link-btn { margin-left: 12px; }

body.drawer-open { overflow: hidden; }
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 26, 46, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(560px, 94vw);
  background: #fff;
  box-shadow: -10px 0 34px rgba(12, 26, 46, 0.16);
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 81;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
/* 员工详情：加宽抽屉 + 内部排版 */
.drawer.wide { width: min(800px, 94vw); }
.drawer.wide .drawer-body { padding: 20px 26px 30px; }
.drawer.wide .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.staff-drawer-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.staff-drawer-columns .drawer-section { margin-bottom: 0; }
@media (max-width: 1000px) {
  .drawer.wide .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-drawer-columns { grid-template-columns: 1fr; gap: 0; }
  .staff-drawer-columns .drawer-section { margin-bottom: 22px; }
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-title { font-size: 16px; font-weight: 600; }
.drawer-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.drawer-close {
  border: none;
  background: var(--panel-2);
  color: var(--text-2);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 30px;
}
.drawer-close:hover { background: #EDF2FA; }

.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; }
.drawer-section { margin-bottom: 22px; }
.drawer-section h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.4px;
}
.detail-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.detail-rows .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--panel-2);
  border-radius: 8px;
  font-size: 12px;
  min-width: 0;
}
.detail-rows .row span { color: var(--text-3); flex: 0 0 auto; }
.detail-rows .row b {
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-ops { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
}

@media (max-width: 640px) {
  .detail-rows { grid-template-columns: 1fr; }
}

/* æŠ½å±‰å†…æŠ•æ”¾æ“ä½œä¸Žç¡®è®¤å¼¹çª— */
.ops-panel { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ops-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.ops-line:last-child { border-bottom: none; }
.ops-label { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.ops-line b { font-size: 13px; font-weight: 500; }

.ops-log { margin-top: 14px; }
.ops-log-title { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.ops-log-item { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 0; }
.ops-log-dot { width: 6px; height: 6px; border-radius: 50%; background: #C9D0DB; flex: 0 0 6px; }
.ops-log-dot.ok { background: #22A06B; }
.ops-log-dot.fail { background: var(--danger); }
.ops-log-text { flex: 1; color: var(--text-2); }
.ops-log-meta { color: var(--text-3); font-size: 11px; }

.confirm-block { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.confirm-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.confirm-line:last-child { border-bottom: none; }
.confirm-line span { color: var(--text-3); }
.confirm-warn {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--danger-weak);
  color: #B91C1C;
  font-size: 12px;
  line-height: 1.6;
}
.confirm-tip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}
.confirm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}

/* ç³»ç»Ÿè®¾ç½®ï¼šåŒæ­¥çŠ¶æ€ä¸Žè‡ªå®šä¹‰é¢‘çŽ‡ */
.sync-config { padding: 2px 0; }
.sync-cfg-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.sync-cfg-name { font-size: 13px; font-weight: 500; }
.sync-cfg-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.sync-cfg-interval { display: flex; gap: 6px; align-items: center; }
.sync-cfg-interval input { width: 82px; }
.sync-cfg-interval select { width: 76px; }
.sync-cfg-tip {
  padding: 10px 20px;
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

@media (max-width: 760px) {
  .sync-cfg-row { grid-template-columns: 1fr; row-gap: 8px; }
}

/* çº¿ç´¢å…³è”ç­›é€‰ä¸Žè·¨é¡µå®šä½é«˜äº® */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--text-3);
}
.filter-chips b {
  font-weight: 500;
  color: var(--primary);
  background: #EDF4FF;
  padding: 3px 9px;
  border-radius: 999px;
}
.row-focus {
  background: #FFF8E6 !important;
  box-shadow: inset 3px 0 0 #F59E0B;
}

/* è§†é¢‘ç»“æž„æ‹†è§£ */
.struct-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.struct-cell {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.struct-cell b { display: block; font-size: 11px; color: var(--primary); margin-bottom: 6px; }
.struct-cell span { font-size: 12px; }
.struct-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 8px;
  background: var(--panel-2);
}
.struct-item b { font-size: 12px; font-weight: 600; }
.struct-item p { margin: 4px 0 0; font-size: 11px; color: var(--text-3); line-height: 1.6; }
.struct-item em { font-style: normal; color: #B7791F; margin-left: 6px; }

@media (max-width: 1100px) {
  .struct-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .struct-grid { grid-template-columns: 1fr 1fr; }
}

/* è®¡åˆ’åˆ—è¡¨é¡¶éƒ¨æ ¸å¿ƒæŒ‡æ ‡ */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.metric-label { font-size: 12px; color: var(--text-3); }
.metric-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 6px 0 8px;
}
.metric-deltas { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.metric-delta {
  color: var(--text-3);
  background: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}
.metric-delta.up { color: #1E8E5A; background: #EAF7EF; }
.metric-delta.down { color: #D64545; background: #FDEEEE; }
.metric-delta.muted { opacity: 0.7; }

.metric-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-options { grid-template-columns: 1fr; }
}

/* é¡¶éƒ¨é€šçŸ¥ä¸­å¿ƒ */
.notify-wrap { position: relative; }
.notify-trigger {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #4e5a6b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.notify-trigger:hover { background: rgba(255, 255, 255, 0.65); }
/* 图标 + 文字形态（线索池） */
.notify-trigger.with-label { width: auto; padding: 0 10px; gap: 6px; }
.notify-label { font-size: 12px; line-height: 1; color: #4e5a6b; }
.notify-trigger.with-label:hover .notify-label { color: #1f2329; }
.notify-trigger.with-label .notify-badge { top: -4px; right: -4px; }
.notify-badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e54545;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}
.notify-pop {
  position: absolute;
  right: 0;
  top: 44px;
  width: 340px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 29, 50, 0.14);
  z-index: 120;
  overflow: hidden;
}
.notify-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.notify-pop-list { max-height: 320px; overflow: auto; }
.notify-empty { padding: 24px 14px; text-align: center; color: var(--text-3); font-size: 12px; }
.notify-all {
  width: 100%;
  padding: 10px;
  border: none;
  border-top: 1px solid var(--line);
  background: #f7f9fd;
  color: var(--primary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.notify-all:hover { background: #edf3ff; }

.notify-tabs { margin-bottom: 0; }
.notify-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.notify-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
}
.notify-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.notify-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f2f4f8;
  align-items: flex-start;
}
.notify-item:last-child { border-bottom: none; }
.notify-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: #b8c2d3;
}
.notify-item.lv-warn .notify-dot { background: #f59e0b; }
.notify-item.lv-danger .notify-dot { background: #e54545; }
.notify-item.lv-info .notify-dot { background: #1677ff; }
.notify-body { flex: 1; min-width: 0; }
.notify-title { font-size: 12.5px; font-weight: 500; line-height: 1.5; }
.notify-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.notify-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }

/* ç³»ç»Ÿè®¾ç½®åˆ†ç±»åŒºåˆ† */
.settings-cats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.settings-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
}
.settings-cat:hover { border-color: #c9d6ea; }
.settings-cat.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f3f8ff;
  font-weight: 600;
}
.cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.cat-dot.blue { background: #1677ff; }
.cat-dot.amber { background: #f59e0b; }
.cat-dot.violet { background: #8b5cf6; }

.card[data-tab="rules"] { border-left: 3px solid #f59e0b; }
.card[data-tab="platform"] { border-left: 3px solid #1677ff; }
.card[data-tab="account"] { border-left: 3px solid #8b5cf6; }

/* åˆ›å»ºè®¡åˆ’å‘å¯¼ */
.wizard-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 29, 50, 0.42);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 200;
}
.wizard-mask.open { opacity: 1; }
.wizard-box {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  width: min(760px, calc(100vw - 32px));
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 29, 50, 0.28);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 201;
}
.wizard-box.open { opacity: 1; transform: translate(-50%, -50%); }
.wizard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 12px;
}
.wizard-title { font-size: 16px; font-weight: 600; }
.wizard-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.wizard-steps {
  display: flex;
  gap: 10px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line);
}
.wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.wizard-step i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef1f6;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
}
.wizard-step.active { color: var(--primary); font-weight: 600; }
.wizard-step.active i { background: var(--primary); color: #fff; }
.wizard-step.done i { background: #eaf7ef; color: #1e8e5a; }
.wizard-body { padding: 18px 20px; overflow: auto; flex: 1; }
.wiz-field { margin-bottom: 16px; }
.wiz-field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; }
.wiz-field label em { color: #d64545; font-style: normal; }
.wiz-field input,
.wiz-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}
.wiz-tip { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.wiz-static {
  font-size: 12px;
  color: var(--text-3);
  padding: 9px 11px;
  background: var(--panel-2);
  border-radius: 8px;
}
.wiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wiz-scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wiz-scene {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.wiz-scene b { display: block; font-size: 13px; margin-bottom: 4px; }
.wiz-scene span { font-size: 11px; color: var(--text-3); }
.wiz-scene.active {
  border-color: var(--primary);
  background: #f3f8ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}
.wiz-summary { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.wiz-materials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}
.wiz-mat {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
}
.wiz-mat span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiz-mat em { font-style: normal; color: var(--text-3); font-size: 11px; }
.wiz-mat.active { border-color: var(--primary); background: #f3f8ff; }
.muted { color: var(--text-3); font-weight: 400; }
.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px;
  border: 1px dashed #c7d2e3;
  border-radius: 10px;
  background: var(--panel-2);
  cursor: pointer;
  text-align: center;
}
.upload-drop b { font-size: 13px; color: var(--primary); }
.upload-drop span { font-size: 11px; color: var(--text-3); }
.upload-drop:hover { border-color: var(--primary); background: #f3f8ff; }
.upload-tips {
  margin: 16px 0 0;
  padding-left: 18px;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.9;
}
.up-preview { margin-top: 12px; }
.up-preview video {
  width: 100%;
  max-height: 220px;
  border-radius: 8px;
  background: #000;
  display: block;
}
.up-preview-name {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  word-break: break-all;
}
.up-progress {
  height: 6px;
  margin-top: 12px;
  background: #e5e8ef;
  border-radius: 999px;
  overflow: hidden;
}
.up-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.up-bar.indeterminate {
  width: 100% !important;
  background: linear-gradient(90deg, #1677ff 0%, #8ab9ff 50%, #1677ff 100%);
  background-size: 200% 100%;
  animation: upflow 1.2s linear infinite;
}
.up-bar.fail { background: #d64545; }
@keyframes upflow {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.muted.danger { color: #d64545; }
.cat-dot.green { background: #16a34a; }
.cat-dot.teal { background: #0d9488; }
.role-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
}
.role-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.role-head b { font-size: 13.5px; margin-right: 8px; }
.perm-wrap { background: var(--panel-2); border-radius: 8px; padding: 12px 14px; }
.perm-group { margin-bottom: 12px; }
.perm-group:last-child { margin-bottom: 0; }
.perm-group-label {
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 600;
}
.perm-items { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.perm-item { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.role-select {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  font-family: inherit;
}
.link-btn.danger { color: #d64545; }
.btn.danger { background: #d64545; color: #fff; border-color: #d64545; }
.wiz-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid #f2f4f8;
  font-size: 12.5px;
}
.wiz-sum-row:last-child { border-bottom: none; }
.wiz-sum-row span { color: var(--text-3); }
.wiz-risks {
  background: #fff8e6;
  border: 1px solid #f6e3b4;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  margin-bottom: 14px;
}
.wiz-risks b { display: block; margin-bottom: 4px; }
.wiz-risks p { margin: 0; color: #7a5b13; line-height: 1.6; }
.wiz-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.wiz-error {
  margin-top: 12px;
  background: #fdeeee;
  border: 1px solid #f5c6c6;
  color: #b42323;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}
.wizard-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fafbfe;
  border-radius: 0 0 14px 14px;
}
.wiz-save-hint { font-size: 11px; color: var(--text-3); }
.wizard-foot-actions { display: flex; gap: 8px; }
@media (max-width: 640px) {
  .wiz-grid, .wiz-scenes { grid-template-columns: 1fr 1fr; }
}

/* ---------- ÐÂÏßË÷¸¡¶¯ÌáÐÑ ---------- */
.lead-flash-root {
  position: fixed;
  top: 66px;
  right: 20px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.lead-flash {
  width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.88);
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.35s;
  pointer-events: auto;
}
.lead-flash.show { transform: translateX(0); opacity: 1; }
.lead-flash.hide { transform: translateX(120%); opacity: 0; }
.lead-flash-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.lead-flash-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
.lead-flash-close { margin-left: auto; background: none; border: 0; color: rgba(255, 255, 255, 0.6); font-size: 16px; line-height: 1; cursor: pointer; }
.lead-flash-title { margin-top: 6px; font-size: 14px; font-weight: 600; }
.lead-flash-desc { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, 0.72); line-height: 1.5; }
.lead-flash-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: rgba(255, 255, 255, 0.5); }
.lead-flash-link { background: none; border: 0; color: #7CC6FF; font-size: 12px; cursor: pointer; }
@media (max-width: 600px) {
  .lead-flash { width: calc(100vw - 40px); }
}
