:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --ink: #1a2233;
  --ink-soft: #5a6478;
  --line: #e3e8f2;
  --brand: #2f6bff;
  --brand-ink: #1e4fd6;
  --brand-soft: #eaf1ff;
  --green: #17a673;
  --green-soft: #e5f6ef;
  --amber: #d98a1a;
  --amber-soft: #fbf1de;
  --red: #d9483b;
  --red-soft: #fbe9e7;
  --shadow: 0 1px 3px rgba(20, 30, 60, .06), 0 6px 24px rgba(20, 30, 60, .06);
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
#app { display: flex; flex-direction: column; height: 100vh; }
code { font-family: "SF Mono", Consolas, monospace; background: #eef1f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- 顶部栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 60px; background: var(--panel);
  border-bottom: 1px solid var(--line); flex-shrink: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 26px; }
.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--ink-soft); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.task-picker { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.task-picker select {
  font-size: 13px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); min-width: 220px; max-width: 320px;
}
.mode-badge {
  font-size: 12px; background: var(--amber-soft); color: var(--amber);
  padding: 5px 10px; border-radius: 20px; font-weight: 600;
}

/* ---------- 布局 ---------- */
.body { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 210px; background: var(--panel); border-right: 1px solid var(--line);
  padding: 14px 10px; flex-shrink: 0; overflow-y: auto; display: flex; flex-direction: column;
}
.nav-group-title {
  font-size: 11px; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .5px; padding: 12px 12px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 2px 0;
  border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 14px;
  text-decoration: none; user-select: none;
}
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item .step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; background: var(--bg);
  font-size: 12px; flex-shrink: 0;
}
.nav-item.active .step { background: var(--brand); color: #fff; }
.sidebar-foot {
  margin-top: auto; padding: 12px; font-size: 11px; color: var(--ink-soft);
  line-height: 1.6; border-top: 1px solid var(--line);
}
.content { flex: 1; overflow-y: auto; padding: 24px 28px; min-width: 0; }

/* ---------- 通用组件 ---------- */
.page-head { margin-bottom: 18px; }
.page-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.page-desc { color: var(--ink-soft); font-size: 13px; margin: 0; max-width: 720px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-title { font-weight: 700; font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }

.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: .12s;
}
.btn:hover { border-color: #c7d0e0; background: #fafbfe; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-ink); }
.btn-danger { color: var(--red); border-color: var(--red-soft); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 12px; margin-left: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=password], .field input[type=number], .field textarea, .field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--ink); background: #fff;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; cursor: pointer;
  font-size: 13px; background: #fff; user-select: none;
}
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.chip-add { display: flex; gap: 8px; margin-top: 8px; }
.chip-add input { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit; }
.chip-add input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #fafbfe; font-size: 12px; color: var(--ink-soft); font-weight: 600; position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }
td.wrap, th.wrap { white-space: normal; min-width: 160px; }

/* ---------- 徽标 ---------- */
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-lvA { background: var(--green-soft); color: var(--green); }
.tag-lvB { background: var(--amber-soft); color: var(--amber); }
.tag-lvC { background: #eef1f7; color: var(--ink-soft); }
.tag-verified { background: var(--green-soft); color: var(--green); }
.tag-unverified { background: #eef1f7; color: var(--ink-soft); }
.tag-invalid { background: var(--red-soft); color: var(--red); }
.tag-personal { background: var(--brand-soft); color: var(--brand-ink); }
.tag-department { background: var(--amber-soft); color: var(--amber); }
.tag-general { background: #eef1f7; color: var(--ink-soft); }
.tag-key { background: var(--green); color: #fff; }

.email-type-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- 关键词分组 ---------- */
.kw-group { margin-bottom: 16px; }
.kw-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.kw-group-head .count { color: var(--ink-soft); font-weight: 400; }
.kw-list { display: flex; flex-direction: column; gap: 6px; }
.kw-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px;
}
.kw-item.on { border-color: var(--brand); background: var(--brand-soft); }
.kw-item input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.kw-item .kw-text { font-family: "SF Mono", Consolas, monospace; flex: 1; word-break: break-all; }
.kw-lang { font-size: 11px; color: var(--ink-soft); background: #eef1f7; padding: 1px 6px; border-radius: 4px; }

/* ---------- 步骤指示 / 提示 ---------- */
.callout {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; font-size: 13px;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid #d5e2ff; margin-bottom: 16px;
}
.callout.warn { background: var(--amber-soft); color: #8a5a10; border-color: #f0dcae; }
.callout.ok { background: var(--green-soft); color: #0d7a51; border-color: #c3e9d7; }

/* 加载中：转圈 + 不确定进度条（长任务防"卡死"错觉） */
.spinner { width: 22px; height: 22px; flex-shrink: 0; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
/* 按钮内联小转圈：用 currentColor，自动适配深/浅底按钮 */
.spinner-sm { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; opacity: .85; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { height: 5px; background: var(--brand-soft); border-radius: 3px; overflow: hidden; }
.progress-bar.indeterminate { height: 100%; width: 40%; border-radius: 3px; background: var(--brand); animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.6s; } .progress-bar.indeterminate { animation: none; width: 100%; opacity: .5; } }

/* ---------- 线索详情抽屉（点线索名右侧滑出，操作不跳页不丢位置） ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .32); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: #fff; z-index: 41; display: flex; flex-direction: column;
  box-shadow: -14px 0 44px rgba(15, 23, 42, .18); animation: drawerIn .16s ease-out;
}
@keyframes drawerIn { from { transform: translateX(48px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.drawer-head h3 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.drawer-sec { margin-bottom: 18px; }
.drawer-sec > label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.lead-name { cursor: pointer; }
.lead-name:hover { color: var(--brand-ink); text-decoration: underline; }

/* 今日工作台条目 */
.dash-item { padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.dash-item:hover { background: var(--brand-soft); }

/* 批量操作条（勾选线索后出现） */
.bulkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--brand-soft); border: 1px solid #d5e2ff; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 13px;
}

.socials-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: -4px 0 14px; }
.socials-lead { font-weight: 600; color: var(--ink); }
.socials-none { color: var(--ink-soft); }
.social-chip { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; color: #fff; background: #64748b; white-space: nowrap; }
.social-chip:hover { opacity: .88; text-decoration: none; }
.social-facebook { background: #1877f2; }
.social-linkedin { background: #0a66c2; }
.social-twitter { background: #111827; }
.social-instagram { background: #d6249f; }
.social-youtube { background: #ff0000; }
.social-tiktok { background: #010101; }
.social-whatsapp { background: #25d366; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .num { font-size: 26px; font-weight: 700; }
.stat .label { color: var(--ink-soft); font-size: 12px; margin-top: 2px; }

/* 运营雷达 */
.radar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 20px; }
.radar-card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ink-soft); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.radar-card.urgent { border-left-color: var(--green); }
.radar-card.warn { border-left-color: var(--amber); }
.radar-h { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.radar-n { background: var(--brand-soft); color: var(--brand-ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: auto; }
.radar-list { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow: auto; }
.radar-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 5px 8px; background: var(--bg); border-radius: 8px; }
.radar-item .radar-act { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.radar-empty { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; color: var(--ink-soft); font-size: 13px; box-shadow: var(--shadow); }

.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 3px rgba(34,180,90,.18); }

/* 使用简报 */
.bf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bf-stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.bf-val { font-size: 20px; font-weight: 700; }
.bf-label { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.bf-track { height: 6px; background: #eef1f7; border-radius: 6px; overflow: hidden; margin-top: 3px; }
.bf-out { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.bf-out:last-child { border-bottom: none; }
.bf-out b { font-size: 16px; }
.bf-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-chart { display: flex; align-items: flex-end; gap: 2px; height: 60px; padding-top: 6px; }
.hm-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.hm-fill { width: 100%; background: linear-gradient(180deg, #6f9bff, #2f6bff); border-radius: 2px; }
@media (max-width: 560px) { .bf-grid { grid-template-columns: repeat(2, 1fr); } }

.empty-state { text-align: center; color: var(--ink-soft); padding: 60px 20px; font-size: 14px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select, .toolbar input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
a.link { color: var(--brand-ink); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 28, 50, .45);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; z-index: 50; overflow-y: auto;
}
.modal {
  background: var(--panel); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  width: 100%; max-width: 560px; padding: 22px 24px;
}
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1a2233; color: #fff; padding: 11px 20px; border-radius: 24px;
  font-size: 13px; z-index: 100; box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

/* ---------- 用户菜单 ---------- */
.user-menu { position: relative; }
.user-dropdown {
  position: absolute; right: 0; top: 40px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); min-width: 200px; padding: 6px; z-index: 20;
}
.user-dropdown-info { padding: 8px 10px; font-size: 12px; color: var(--ink-soft); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-dropdown-item { display: block; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); text-decoration: none; }
.user-dropdown-item:hover { background: var(--bg); }

/* ---------- 管理员模拟登录横幅 ---------- */
.imp-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300; height: 38px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(90deg, #b45309, #d97706); color: #fff;
  font-size: 13px; font-weight: 550; box-shadow: 0 2px 8px rgba(120,60,0,.3);
}
.imp-banner b { font-weight: 750; }
.imp-banner .btn { padding: 3px 10px; background: rgba(255,255,255,.95); color: #92400e; border: none; font-weight: 650; }
.imp-banner .btn:hover { background: #fff; }
body.has-imp-banner { padding-top: 38px; }

/* ---------- 登录/注册全屏门 ---------- */
#authScreen {
  position: fixed; inset: 0; z-index: 200; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(1100px 620px at 14% 8%, #e8f0ff 0%, rgba(232,240,255,0) 55%),
    radial-gradient(900px 520px at 92% 96%, #eaf1ff 0%, rgba(234,241,255,0) 52%),
    linear-gradient(135deg, #eef2fb 0%, #e4ebf8 100%);
}
.auth-layout {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  width: 100%; max-width: 960px; background: #fff;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 32px 80px -24px rgba(24, 39, 90, .3), 0 4px 16px rgba(24, 39, 90, .06);
}
.auth-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(155deg, #4079ff 0%, #245ae6 50%, #163fb0 100%);
  color: #fff; padding: 46px 40px; display: flex; flex-direction: column;
}
.auth-hero::before {   /* 柔光装饰：右上高光 + 左下深蓝，增加质感层次 */
  content: ''; position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(440px 340px at 84% 6%, rgba(255,255,255,.24), transparent 62%),
    radial-gradient(520px 440px at 8% 104%, rgba(9,24,74,.5), transparent 56%);
}
.auth-hero .brandmark { color: #fff; font-size: 25px; margin-bottom: 4px; }
.auth-hero .brandmark .bm-accent { color: #ffd27a; }
.auth-hero h1 { font-size: 27px; line-height: 1.3; margin: 22px 0 12px; font-weight: 750; letter-spacing: -.01em; text-wrap: balance; }
.auth-hero .hero-sub { font-size: 14px; opacity: .9; line-height: 1.65; margin: 0 0 30px; max-width: 33ch; }
.auth-feats { display: flex; flex-direction: column; gap: 14px; }
.auth-feat { display: flex; gap: 13px; align-items: center; }
.auth-feat .fi {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.17);
}
.auth-feat b { display: block; font-size: 13.5px; font-weight: 650; }
.auth-feat span { font-size: 12px; opacity: .8; line-height: 1.5; }
.auth-hero .hero-foot { margin-top: auto; padding-top: 30px; font-size: 12px; opacity: .78; }
/* 登录卡两侧空白处的装饰插画：左「瞭望找客」右「海空运交付」 */
.auth-aside {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: calc((100% - 960px) / 2); display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 0;
}
.auth-aside.left { left: 0; }
.auth-aside.right { right: 0; }
.auth-aside .aside-svg { width: clamp(180px, 82%, 320px); height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .aside-route { animation: heroFlow 3.2s linear infinite; }
  .aside-ping { animation: heroPop 3s ease-in-out infinite; transform-origin: center; }
  .aside-radar path { animation: heroPing 3.2s ease-in-out infinite; }
  .aside-radar path:nth-child(2) { animation-delay: .3s; }
  .aside-radar path:nth-child(3) { animation-delay: .6s; }
}
@keyframes heroFlow { to { stroke-dashoffset: -26; } }
@keyframes heroPing { 0%,100% { opacity: .2; } 50% { opacity: .9; } }
@keyframes heroPop { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
/* 侧边空间不够时（窄屏/中屏）隐藏，避免压到登录卡 */
@media (max-width: 1280px) { .auth-aside { display: none; } }
.auth-panel { padding: 44px 40px; display: flex; align-items: center; justify-content: center; overflow-y: auto; }
.auth-card { width: 100%; max-width: 372px; }
.auth-head { margin-bottom: 22px; }
.auth-head h2 { font-size: 22px; font-weight: 700; margin: 0 0 5px; letter-spacing: -.01em; }
.auth-head p { font-size: 13px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.auth-card .field input, .auth-standalone .field input { padding: 11px 13px; border-radius: 10px; font-size: 14px; }
.auth-card .btn-primary, .auth-standalone .btn-primary {
  padding: 12px; font-size: 14.5px; font-weight: 650; border-radius: 10px; border: none;
  background: linear-gradient(180deg, #3f78ff, #2358e4);
  box-shadow: 0 8px 18px -6px rgba(47, 107, 255, .55);
}
.auth-card .btn-primary:hover, .auth-standalone .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 22px -6px rgba(47, 107, 255, .6); }
.auth-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-link { color: var(--brand-ink); cursor: pointer; font-size: 12.5px; }
.auth-link:hover { text-decoration: underline; }
.auth-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-soft); margin: 4px 0 14px; line-height: 1.5; cursor: pointer; }
.auth-consent input { margin-top: 2px; flex-shrink: 0; }
.auth-standalone {
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(20, 30, 60, .15);
  width: 100%; max-width: 420px; padding: 36px;
}
@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; max-width: 440px; }
  .auth-hero { padding: 30px 28px; }
  .auth-hero h1 { font-size: 22px; margin: 14px 0 8px; }
  .auth-hero .hero-sub { margin-bottom: 4px; }
  .auth-feats { display: none; }
  .auth-hero .hero-foot { display: none; }
  .auth-panel { padding: 32px 26px; }
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .logo { font-size: 40px; }
.auth-brand h1 { font-size: 20px; margin: 8px 0 2px; }
.auth-brand p { color: var(--ink-soft); font-size: 13px; margin: 0; }
.auth-tabs { display: flex; gap: 4px; background: #eef2fb; border-radius: 11px; padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; text-align: center; padding: 9px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); transition: color .15s, background .15s; }
.auth-tab.on { background: #fff; color: var(--brand-ink); font-weight: 650; box-shadow: 0 1px 4px rgba(20, 30, 60, .1); }
.auth-error { background: var(--red-soft); color: var(--red); padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.auth-ok { background: var(--green-soft); color: #0d7a51; padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 12px; color: var(--ink-soft); }
.pending-icon { font-size: 48px; text-align: center; }

/* ---------- 操作历史时间线 ---------- */
.timeline { max-height: 440px; overflow-y: auto; padding-left: 6px; }
.timeline-item { display: flex; gap: 12px; padding: 4px 0; position: relative; }
.timeline-item:not(:last-child) .timeline-dot::after {
  content: ''; position: absolute; left: 4px; top: 14px; bottom: -6px; width: 2px; background: var(--line);
}
.timeline-dot { position: relative; flex-shrink: 0; }
.timeline-dot::before { content: ''; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 4px; }
.timeline-body { padding-bottom: 10px; }

pre.email-body {
  background: #fafbfe; border: 1px solid var(--line); border-radius: 8px; padding: 14px;
  white-space: pre-wrap; word-break: break-word; font-family: "SF Mono", Consolas, monospace;
  font-size: 13px; line-height: 1.6; max-height: 420px; overflow-y: auto;
}

/* ============================================================ 第三批：看板 / 移动端 / 视觉精修 */

/* ---------- 跟进看板（线索库的第二视图） ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; }
.kanban-col {
  flex: 0 0 236px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; min-height: 120px;
}
.kanban-col > h4 { margin: 0 0 8px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); }
.kanban-col.dragover { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.kanban-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 8px; font-size: 12.5px; cursor: grab;
  box-shadow: 0 1px 2px rgba(20,30,60,.05);
}
.kanban-card:hover { border-color: var(--brand); }
.kanban-card.dragging { opacity: .45; }
.kanban-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 视觉精修（对齐新版登录页的质感） ---------- */
/* 文字标语 logo：AI For Trade（AI For 深蓝 + Trade 青色） */
.brandmark { display: inline-flex; align-items: baseline; gap: .18em; font-weight: 800; letter-spacing: .01em; line-height: 1; white-space: nowrap; color: #123a86; }
.brandmark .bm-accent { color: #1f8aa6; }
.brandmark-lg { font-size: 24px; }
.topbar .brandmark { font-size: 21px; }
.nav-item { position: relative; }
.nav-item.active { background: linear-gradient(90deg, var(--brand-soft), rgba(234,241,255,.35)); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 2px; background: var(--brand);
}
thead th { background: #f8fafd; }
.card { transition: box-shadow .15s; }

/* ---------- 移动端适配（老板手机上也能用） ---------- */
#menuBtn { display: none; font-size: 16px; padding: 6px 10px; }
@media (max-width: 820px) {
  #menuBtn { display: inline-flex; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 14px; }
  .task-picker span { display: none; }
  .task-picker select { min-width: 130px; max-width: 46vw; }
  .topbar-right { flex-wrap: wrap; gap: 6px; }
  .mode-badge { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 232px; z-index: 60;
    transform: translateX(-105%); transition: transform .18s ease-out;
    box-shadow: none; border-right: 1px solid var(--line);
  }
  .sidebar.open { transform: none; box-shadow: 24px 0 60px rgba(15,23,42,.3); }
  .content { padding: 14px 12px; }
  .page-title { font-size: 17px; }
  .modal { max-width: 94vw; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .row { flex-direction: column; }
  .toolbar { gap: 6px; }
  .toolbar select, .toolbar input { font-size: 12px; padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
