/* ============================================================
   云天客户管理系统 · 设计系统 v2
   专业工具平台质感：精致色板 / 层次阴影 / 统一动效
   ============================================================ */
:root {
  /* 品牌色 */
  --primary: #4c6fff;
  --primary-strong: #3b5bdb;
  --primary-deep: #2f49b8;
  --primary-soft: #eef2ff;
  --primary-ghost: rgba(76, 111, 255, .08);

  /* 中性色（冷调灰阶） */
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #8e9aae;
  --ink-4: #b6c0d0;
  --line: #e7eaf1;
  --line-soft: #eef1f6;
  --bg: #f6f7fa;
  --card: #ffffff;

  /* 功能色 */
  --green: #12a150;
  --green-soft: #e7f8ee;
  --amber: #dc9c04;
  --amber-soft: #fdf6e3;
  --red: #e5484d;
  --red-soft: #fdecec;
  --purple: #7c5cfc;
  --purple-soft: #f1edfe;
  --teal: #0e8fb4;
  --teal-soft: #e5f6fb;

  /* 深色（侧边栏/登录品牌区） */
  --navy-1: #0d1220;
  --navy-2: #161d31;
  --navy-3: #1f2a44;

  /* 形状与阴影 */
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 1px 3px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 56px rgba(16, 24, 40, .18);
  --ease: cubic-bezier(.32, .72, .35, 1);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Roboto", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: var(--font); font-size: 14px; color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
::selection { background: rgba(76, 111, 255, .18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #ccd3e0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b6c0d0; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页（品牌分栏） ============ */
.login-wrap {
  min-height: 100vh; display: flex;
  background: var(--card);
}
.login-brand {
  flex: 1.05; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(76, 111, 255, .32), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(124, 92, 252, .22), transparent 60%),
    linear-gradient(160deg, var(--navy-1) 0%, var(--navy-2) 58%, var(--navy-3) 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px 56px;
}
.login-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.login-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.login-brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #6f8cff, var(--primary) 60%, var(--primary-deep));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(76, 111, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.login-brand-name { font-size: 16.5px; font-weight: 700; letter-spacing: .3px; }
.login-brand-name small { display: block; font-size: 10.5px; font-weight: 500; color: #8fa0c8; letter-spacing: 2.5px; margin-top: 2px; }
.login-brand-mid { position: relative; z-index: 1; }
.login-brand-mid .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; letter-spacing: 2px; color: #9fb0d8;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px;
  padding: 5px 13px; margin-bottom: 22px; background: rgba(255, 255, 255, .04);
}
.login-brand-mid h1 { font-size: 34px; line-height: 1.32; font-weight: 750; letter-spacing: .5px; }
.login-brand-mid h1 em { font-style: normal; background: linear-gradient(90deg, #8fb0ff, #c9d6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-brand-mid p { color: #aebbd8; font-size: 14.5px; margin-top: 14px; max-width: 420px; line-height: 1.75; }
.login-feats { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.login-feat { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #cbd6ec; }
.login-feat .fi {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
  display: flex; align-items: center; justify-content: center; color: #9db4ee;
}
.login-feat b { color: #fff; font-weight: 650; }
.login-brand-foot { position: relative; z-index: 1; color: #66779f; font-size: 12px; line-height: 1.8; }

.login-panel {
  width: 480px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  padding: 48px 52px; background: var(--card);
}
.login-box { width: 100%; max-width: 360px; }
.login-box .lg-title { font-size: 23px; font-weight: 750; letter-spacing: .3px; }
.login-box .lg-sub { color: var(--ink-3); font-size: 13.5px; margin: 6px 0 30px; }
.login-error {
  background: var(--red-soft); color: var(--red); border-radius: var(--r-md);
  padding: 10px 13px; font-size: 13px; margin-bottom: 16px; display: none;
  border: 1px solid rgba(229, 72, 77, .18);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 550; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10.5px 13px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  outline: none; transition: border-color .16s, box-shadow .16s; background: #fcfcfd;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(76, 111, 255, .13); background: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field textarea { resize: vertical; min-height: 78px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; letter-spacing: .2px;
  transition: transform .14s var(--ease), box-shadow .14s, background .14s, color .14s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #5d7bff, var(--primary) 55%, var(--primary-strong));
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 6px 16px rgba(76, 111, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(16, 24, 40, .1), 0 10px 22px rgba(76, 111, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: #f2f4f8; color: var(--ink-2); }
.btn-ghost:hover { background: #e9edf4; color: var(--ink); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #fbdcda; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 6.5px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.login-tip {
  margin-top: 20px; padding: 13px 15px;
  background: #f8f9fc; border: 1px dashed var(--line); border-radius: var(--r-md);
  font-size: 12.5px; color: var(--ink-3); line-height: 1.85;
}
.login-tip b { color: var(--ink-2); font-weight: 650; }

/* ============ 应用骨架 ============ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 100%);
  color: #c3cde2; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  transition: transform .28s var(--ease);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05), 1px 0 12px rgba(16, 24, 40, .05);
}
.sidebar .brand {
  display: flex; align-items: center; gap: 11px;
  padding: 19px 18px 17px; border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sidebar .brand .mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #6f8cff, var(--primary) 60%, var(--primary-deep));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(76, 111, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.sidebar .brand .name { color: #fff; font-weight: 700; font-size: 14.5px; letter-spacing: .3px; line-height: 1.25; }
.sidebar .brand .tag { font-size: 10px; color: #66779f; letter-spacing: 2.2px; margin-top: 2px; }
.nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9.5px 12px; border-radius: var(--r-md);
  color: #aebbd6; font-size: 13.5px; margin-bottom: 2px;
  transition: background .14s, color .14s; width: 100%; text-align: left; position: relative;
}
.nav-item svg { flex-shrink: 0; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(76, 111, 255, .26), rgba(76, 111, 255, .1));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(76, 111, 255, .22);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0; background: #7f9bff;
  box-shadow: 0 0 10px rgba(127, 155, 255, .8);
}
.nav-item .badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 650;
}
.nav-sec { font-size: 10.5px; color: #5d6b8f; letter-spacing: 2px; padding: 14px 12px 6px; }
.sidebar .foot {
  padding: 13px 16px; border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 11.5px; color: #5d6b8f; line-height: 1.7;
}
.sidebar .foot b { color: #8fa0c8; font-weight: 600; }

.main { flex: 1; margin-left: 224px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; flex-shrink: 0;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
.topbar .page-title { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.topbar .page-desc { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.topbar .spacer { flex: 1; }
.sync-dot { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); user-select: none; }
.sync-dot i {
  width: 7px; height: 7px; border-radius: 50%; background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, .16);
}
.sync-dot.live i { animation: pulse 1.2s ease; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(46, 204, 113, .05); } }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 13px 4px 4px; border-radius: 99px;
  background: #f2f4f8; cursor: pointer; transition: background .14s;
  border: 1px solid transparent;
}
.user-chip:hover { background: #e9edf4; border-color: var(--line); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-weight: 650; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.menu-btn { display: none; }

.content { padding: 24px; flex: 1; }

/* ============ 卡片与网格 ============ */
.card {
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft);
  transition: box-shadow .18s;
}
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head .t { font-weight: 700; font-size: 14.5px; letter-spacing: .2px; }
.card-head .sub { font-size: 12px; color: var(--ink-3); }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.kpi-row { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }

/* KPI 卡 */
.kpi { padding: 17px 19px; display: flex; gap: 14px; align-items: center; position: relative; overflow: hidden; }
.kpi::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--kpi-c, var(--primary)), transparent 78%);
  opacity: .85;
}
.kpi .ic {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .04);
}
.kpi .v { font-size: 23px; font-weight: 760; letter-spacing: -.2px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 2px; letter-spacing: 0; }
.kpi .k { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* 徽章与标签 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; letter-spacing: .1px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; padding: 2px 9px; border-radius: 7px; background: #eef1f8; color: var(--ink-2); font-size: 12px; margin-right: 6px; }

.empty { padding: 52px 20px; text-align: center; color: var(--ink-3); }
.empty .ic { margin-bottom: 12px; opacity: .45; }
.empty .t { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.empty .d { font-size: 12.5px; margin-top: 5px; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 650;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: #fafbfd; white-space: nowrap; letter-spacing: .2px;
}
.tbl td { padding: 11.5px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: #f8faff; }
.tbl tr:last-child td { border-bottom: none; }
.num { font-variant-numeric: tabular-nums; }
.money { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.1px; }
.money-in { color: var(--green); }
.money-out { color: var(--amber); }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }

/* 工具条 */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search-box { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search-box input {
  width: 100%; padding: 9px 12px 9px 35px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(76, 111, 255, .12); }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-4); }
.select {
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; outline: none; cursor: pointer; min-width: 96px; transition: border-color .15s;
}
.select:focus { border-color: var(--primary); }

/* 页签 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  padding: 10px 16px; font-size: 13.5px; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; font-weight: 550; transition: color .14s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* 阶段步骤条 */
.stepper { display: flex; align-items: center; gap: 0; margin: 6px 0 2px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-4); }
.step .b {
  width: 21px; height: 21px; border-radius: 50%;
  background: #edf0f7; color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; transition: all .2s;
}
.step.done { color: var(--primary); font-weight: 600; }
.step.done .b { background: var(--primary); color: #fff; }
.step-cur { color: var(--primary); font-weight: 700; }
.step-cur .b { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(76, 111, 255, .18); }
.step-line { width: 24px; height: 2px; background: #edf0f7; margin: 0 5px; flex-shrink: 0; border-radius: 2px; }
.step-line.done { background: var(--primary); }

/* 漏斗 */
.funnel-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.funnel-row .lb { width: 44px; font-size: 13px; color: var(--ink-2); flex-shrink: 0; }
.funnel-row .bar-bg { flex: 1; height: 20px; background: #f2f4f9; border-radius: 6px; overflow: hidden; }
.funnel-row .bar { height: 100%; border-radius: 6px; min-width: 2px; transition: width .6s var(--ease); }
.funnel-row .ct { width: 64px; text-align: right; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 18px 8px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: -19px; top: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.tl-item.gray::before { background: var(--ink-4); box-shadow: 0 0 0 3px #eef1f8; }
.tl-item .hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .tt { font-weight: 650; font-size: 13.5px; }
.tl-item .tm { font-size: 12px; color: var(--ink-3); }
.tl-item .ct { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.65; }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(13, 18, 32, .45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .24s; backdrop-filter: blur(2px); }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 94vw;
  background: var(--bg); z-index: 95;
  transform: translateX(103%); transition: transform .32s var(--ease);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.drawer.open { transform: none; }
.drawer-head {
  background:
    radial-gradient(600px 260px at 90% -40%, rgba(76, 111, 255, .35), transparent 65%),
    linear-gradient(150deg, var(--navy-1), var(--navy-2) 70%, var(--navy-3));
  color: #fff; padding: 20px 24px 15px; flex-shrink: 0;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06);
}
.drawer-head .row1 { display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h3 { font-size: 17.5px; font-weight: 750; line-height: 1.3; letter-spacing: .2px; }
.drawer-head .sub { color: #9fb0d0; font-size: 12.5px; margin-top: 4px; }
.drawer-head .acts { margin-left: auto; display: flex; gap: 6px; }
.drawer-head .acts button { color: #aebbd6; padding: 7px; border-radius: var(--r-sm); transition: all .14s; }
.drawer-head .acts button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 44px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(13, 18, 32, .48); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .18s; backdrop-filter: blur(3px);
}
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 480px; max-width: 100%; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  transform: scale(.95) translateY(8px); transition: transform .2s var(--ease);
}
.modal-mask.open .modal { transform: none; }
.modal-head { display: flex; align-items: center; padding: 18px 22px 0; }
.modal-head .t { font-size: 16px; font-weight: 750; letter-spacing: .2px; }
.modal-head .x { margin-left: auto; color: var(--ink-3); font-size: 20px; line-height: 1; padding: 4px 9px; border-radius: var(--r-sm); }
.modal-head .x:hover { background: #f2f4f8; color: var(--ink); }
.modal-body { padding: 16px 22px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.req::after { content: " *"; color: var(--red); }

/* Toast */
.toasts { position: fixed; top: 20px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; }
.toast {
  background: var(--navy-2); color: #fff;
  padding: 11px 17px; border-radius: var(--r-md);
  font-size: 13.5px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 9px;
  animation: toastIn .28s var(--ease); max-width: 86vw;
  border: 1px solid rgba(255, 255, 255, .08);
}
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7f9bff; flex-shrink: 0; }
.toast.err { background: #b3232a; }
.toast.err::before { background: #ffb4b6; }
.toast.ok { background: #0b7d43; }
.toast.ok::before { background: #9ff0c0; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }

/* 进度与待办 */
.progress { height: 7px; background: #eef1f8; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #7f9bff); transition: width .5s var(--ease); }
.check {
  width: 19px; height: 19px; border-radius: 6px;
  border: 1.5px solid #c6cede; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s; background: #fff;
}
.check:hover { border-color: var(--primary); }
.check.on { background: var(--primary); border-color: var(--primary); }
.check.on svg { display: block; }
.check svg { display: none; width: 11px; height: 11px; }
.task-item { display: flex; gap: 11px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
.task-item:last-child { border-bottom: none; }
.task-item .tt { font-size: 13.5px; line-height: 1.5; }
.task-item.done .tt { text-decoration: line-through; color: var(--ink-3); }
.task-item .meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.due { font-weight: 650; }
.due.over { color: var(--red); }
.due.soon { color: var(--amber); }

.row-flex { display: flex; align-items: center; gap: 10px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb-card { margin-bottom: 16px; }
.footer-note { text-align: center; color: var(--ink-4); font-size: 12px; padding: 28px 0 10px; letter-spacing: .3px; }
.section-title { font-size: 14.5px; font-weight: 750; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; letter-spacing: .2px; }
.section-title:first-child { margin-top: 0; }
.stat-mini { display: flex; gap: 22px; flex-wrap: wrap; }
.stat-mini .it .v { font-size: 18px; font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.stat-mini .it .k { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ============ 达人库 ============ */
.talent-card { cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.talent-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.talent-price { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 6px; }
.talent-price b { color: var(--amber); font-size: 13.5px; }
.talent-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.stat-card { background: #f6f8fd; border-radius: var(--r-md); padding: 12px 14px; }
.stat-card .k { font-size: 12px; color: var(--ink-3); }
.stat-card .v { font-size: 19px; font-weight: 760; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ============ 进度日历 ============ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wk { margin-bottom: 6px; }
.cal-wkcell { text-align: center; font-size: 12px; color: var(--ink-3); font-weight: 650; padding: 4px 0; }
.cal-cell {
  position: relative; min-height: 78px; padding: 7px 8px; border-radius: 10px;
  background: #fbfcfe; border: 1.5px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s; overflow: hidden;
}
.cal-cell:hover { background: #f2f5fc; }
.cal-cell.out { opacity: .38; }
.cal-cell.today { background: #eef2ff; border-color: #c3d0f7; }
.cal-cell.sel { border-color: var(--primary); background: #e9eeff; }
.cal-dnum { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cal-cell.today .cal-dnum { color: var(--primary); }
.cal-evts { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.cal-ev {
  font-size: 10.5px; line-height: 1.35; padding: 2px 5px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600;
}
.cal-more { font-size: 10.5px; color: var(--ink-3); padding-left: 2px; }
.cal-od { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cal-legend i.lg, .lg { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
i.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ============ 全局搜索 ============ */
.gs-result { margin-top: 14px; max-height: 46vh; overflow-y: auto; }
.gs-row { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 10px; cursor: pointer; transition: background .14s; }
.gs-row:hover { background: #f4f7fe; }
.topbar-btn { padding: 8px 10px; }

/* ============ 待跟进预警 ============ */
.stale-pill {
  display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 650;
  color: #b45309; background: var(--amber-soft); border: 1px solid #f3e2b3;
  padding: 5px 11px; border-radius: 99px; cursor: pointer; white-space: nowrap;
}
.stale-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.btn.stale-on { background: var(--amber-soft); color: #b45309; border-color: #f3e2b3; }

@media (max-width: 1080px) { .cal-cell { min-height: 64px; } }
@media (max-width: 920px) {
  .stale-pill { display: none !important; }
}
@media (max-width: 1080px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } .cal-layout { grid-template-columns: 1fr !important; } }
@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .drawer { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .hide-m { display: none !important; }
  .topbar .page-desc { display: none; }
  .login-brand { display: none; }
  .login-panel { width: 100%; padding: 40px 26px; }
  .cal-cell { min-height: 56px; padding: 5px 6px; }
  .cal-ev { font-size: 9.5px; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; gap: 10px; }
  .kpi .ic { width: 38px; height: 38px; }
  .kpi .v { font-size: 18.5px; }
}

/* ============ 知识库 ============ */
.doc-card { cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.doc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.doc-card.read { border-color: #cdecd9; }
.doc-ic { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-summary { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; margin-top: 9px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #f2f4f9; color: var(--ink-3); }

/* 文档阅读器 */
.doc-reader { font-size: 14px; line-height: 1.85; color: var(--text-2); }
.doc-reader .md-h1 { font-size: 21px; font-weight: 800; color: var(--ink); margin: 4px 0 14px; letter-spacing: -.3px; }
.doc-reader .md-h2 { font-size: 17px; font-weight: 750; color: var(--ink); margin: 22px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.doc-reader .md-h3 { font-size: 15px; font-weight: 750; color: var(--ink); margin: 18px 0 8px; }
.doc-reader .md-h4 { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 14px 0 6px; }
.doc-reader .md-p { margin: 9px 0; }
.doc-reader .md-list { margin: 8px 0 8px 4px; padding-left: 20px; }
.doc-reader .md-list li { margin: 4px 0; }
.doc-reader .md-quote { margin: 10px 0; padding: 9px 14px; border-left: 3px solid var(--primary);
  background: #f6f8fd; border-radius: 0 8px 8px 0; color: var(--ink-2); font-size: 13px; }
.doc-reader code { background: #eef1f8; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: #7c3aed; }
.md-tbl-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
.md-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.md-tbl th { background: #f6f8fd; text-align: left; padding: 9px 12px; font-weight: 700; color: var(--ink-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.md-tbl td { padding: 9px 12px; border-bottom: 1px solid #f0f3f9; vertical-align: top; }
.md-tbl tbody tr:last-child td { border-bottom: none; }
.md-tbl tbody tr:hover { background: #fafbfe; }

/* ============ 培训闯关 ============ */
.quiz-card { cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.quiz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quiz-ic { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quiz-progress { height: 5px; background: #eef1f8; border-radius: 99px; overflow: hidden; }
.quiz-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #7f9bff); transition: width .3s var(--ease); }
.quiz-q { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.6; margin: 6px 0 16px; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt {
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  background: #fff; font-size: 14px; color: var(--text-2); cursor: pointer;
  transition: all .15s var(--ease);
}
.quiz-opt:hover { border-color: #b9c6e8; background: #fafbff; }
.quiz-opt.on { border-color: var(--primary); background: #eef2ff; color: var(--ink); font-weight: 650; }
.quiz-opt .k {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  background: #eef1f8; color: var(--ink-3); font-size: 12px; font-weight: 750;
  display: inline-flex; align-items: center; justify-content: center;
}
.quiz-opt.on .k { background: var(--primary); color: #fff; }
.quiz-result { text-align: center; padding: 18px 14px; border-radius: var(--r-md); }
.quiz-result.pass { background: linear-gradient(180deg, #eafaf1, #f6fdf9); }
.quiz-result.fail { background: linear-gradient(180deg, #fdeeef, #fef7f7); }
.quiz-result .sc { font-size: 42px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.quiz-result.pass .sc { color: #0b7d43; }
.quiz-result.fail .sc { color: var(--red); }
.quiz-result .sc small { font-size: 15px; font-weight: 650; margin-left: 3px; }
.quiz-review { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 10px; }
.quiz-review.ok { border-left: 3px solid #059669; }
.quiz-review.no { border-left: 3px solid var(--red); }
.quiz-review .hd { margin-bottom: 6px; }
.quiz-review .q { font-size: 13.5px; font-weight: 650; color: var(--ink); line-height: 1.6; margin-bottom: 5px; }
.quiz-explain { margin-top: 6px; padding: 8px 11px; background: #f6f8fd; border-radius: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* 关卡编辑器 */
.qform-row { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 12px; background: #fcfdff; }
.qform-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qform-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer;
  transition: all .14s;
}
.qform-opt.on { border-color: var(--primary); background: #eef2ff; }
.qform-opt .k { width: 20px; height: 20px; border-radius: 6px; background: #eef1f8; color: var(--ink-3);
  font-size: 11px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qform-opt.on .k { background: var(--primary); color: #fff; }
.qform-opt .qform-otext { flex: 1; border: none; outline: none; font-size: 13px; background: transparent; min-width: 0; }
@media (max-width: 640px) { .qform-opts { grid-template-columns: 1fr; } }

/* ---------- 财务表格导入 ---------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: 14px; padding: 30px 20px; text-align: center;
  background: #fafbff; transition: all .16s; cursor: pointer;
}
.dropzone.drag { border-color: var(--primary); background: #eef2ff; }
.dropzone .dz-ic { color: var(--primary); opacity: .9; margin-bottom: 6px; }
.dropzone .dz-t { font-size: 14.5px; color: var(--ink); }
.dropzone .dz-t .link { color: var(--primary); font-weight: 650; cursor: pointer; }
.dropzone .dz-d { font-size: 12px; margin-top: 4px; }
#finParseBox { margin-top: 16px; }
.fin-imp-list { display: flex; flex-direction: column; gap: 10px; }
.fin-imp-card {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; cursor: pointer; transition: all .14s;
}
.fin-imp-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(40,70,160,.08); }
.fin-imp-card .fi-ic { width: 42px; height: 42px; border-radius: 10px; background: #eef2ff; color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fin-imp-card .fi-main { flex: 1; min-width: 0; }
.fin-imp-card .fi-title { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.fin-imp-card .fi-sub { font-size: 12px; margin-top: 2px; }
.fin-imp-card .fi-kpi { display: flex; gap: 16px; flex-shrink: 0; }
.fin-imp-card .fi-kpi > div { text-align: right; }
.fin-imp-card .fi-kpi span { display: block; font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; }
.fin-imp-card .fi-kpi small { font-size: 11px; color: var(--text-3); }

/* 导入解析结果面板 */
.imp-map { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.imp-map .mp { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fbfcff; font-size: 12.5px; }
.imp-map .mp b { color: var(--primary); font-weight: 650; }
.imp-map .mp .mv { color: var(--ink-2); }
.imp-grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.imp-grid th, .imp-grid td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: nowrap; }
.imp-grid th { background: #f5f7fc; color: var(--ink-2); font-weight: 650; position: sticky; top: 0; }
.imp-grid .dir-in { color: #15803d; font-weight: 700; }
.imp-grid .dir-out { color: #c2261f; font-weight: 700; }
.imp-grid .dir-unk { color: #b45309; font-weight: 700; }
.warn-box { margin: 10px 0; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7; }
.warn-box .w { display: flex; gap: 7px; align-items: flex-start; padding: 2px 0; }
.warn-box .w .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.warn-box.info { background: #eef4ff; color: #2458e6; }
.warn-box.info .dot { background: #2458e6; }
.warn-box.warn { background: #fdf6e7; color: #92600a; }
.warn-box.warn .dot { background: #d97706; }
.warn-box.danger { background: #fdecec; color: #c2261f; }
.warn-box.danger .dot { background: #c2261f; }
.imp-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.imp-summary-grid .sg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.imp-summary-grid .sg .k { font-size: 12px; color: var(--text-3); }
.imp-summary-grid .sg .v { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 2px; }
.imp-by { margin-top: 12px; }
.imp-by h4 { font-size: 13px; color: var(--ink-2); margin: 0 0 6px; }
.mini-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini-tbl th, .mini-tbl td { border: 1px solid var(--line); padding: 5px 8px; text-align: right; }
.mini-tbl th:first-child, .mini-tbl td:first-child { text-align: left; }
.mini-tbl th { background: #f5f7fc; color: var(--ink-2); font-weight: 650; }

/* 日程可见性选择 */
.vis-opt { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: all .14s; background: #fff; }
.vis-opt span { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.vis-opt small { font-size: 11px; color: var(--text-3); }
.vis-opt.on { border-color: var(--primary); background: #eef2ff; }
.vis-opt.on span { color: var(--primary); }

/* ---------- 内部群聊 ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 168px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 4px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; color: var(--ink); }
.chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: #f7f9fd; }
.chat-msg { display: flex; gap: 9px; align-items: flex-start; max-width: 82%; }
.chat-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-bubble { background: #fff; border: 1px solid var(--line); border-radius: 12px; border-top-left-radius: 3px; padding: 8px 12px; min-width: 0; box-shadow: 0 1px 2px rgba(20,40,90,.04); }
.chat-msg.me .chat-bubble { background: #eef2ff; border-color: #d6defb; border-top-left-radius: 12px; border-top-right-radius: 3px; }
.chat-msg.mention .chat-bubble { border-color: #f0c36d; background: #fffaf0; box-shadow: 0 0 0 2px rgba(217,119,6,.12); }
.chat-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.chat-meta .chat-time { font-size: 11px; opacity: .8; }
.chip-at { background: #fdecec; color: #c2261f; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.chat-text { font-size: 14px; color: var(--ink); line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.chat-text .at { color: #2458e6; font-weight: 650; background: #e8eeff; padding: 0 3px; border-radius: 4px; }
.chat-composer { position: relative; display: flex; gap: 9px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-composer textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none; max-height: 120px; line-height: 1.5; }
.chat-composer textarea:focus { border-color: var(--primary); }
.chat-mention-pop { position: absolute; left: 14px; right: 90px; bottom: 100%; margin-bottom: 6px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 26px rgba(20,40,90,.14); overflow: hidden; max-height: 240px; overflow-y: auto; z-index: 5; }
.chat-mention-pop .cmp { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; }
.chat-mention-pop .cmp:hover { background: #eef2ff; }
.chat-mention-pop .cmp .muted { font-size: 11.5px; margin-left: auto; }
@media (max-width: 640px) { .chat-wrap { height: calc(100vh - 150px); } .chat-msg { max-width: 92%; } }
