/* ==========================================================================
   SUNMON CRM · Design System
   ========================================================================== */

:root {
  --bg: #f2f5fa;
  --bg-soft: #f8fafd;
  --surface: #ffffff;
  --ink: #0c1a2e;
  --ink-2: #3c4c66;
  --ink-3: #5f6d86;
  --ink-4: #8593a9;
  --line: #e3e9f3;
  --line-2: #eef2f9;
  --brand: #2b59ff;
  --brand-600: #1c43df;
  --brand-50: #eef3ff;
  --violet: #7c5cff;
  --teal: #0fb5a6;
  --amber: #eba51c;
  --rose: #ef4b6a;
  --green: #14a06a;
  --slate: #64748b;

  --grad-brand: linear-gradient(135deg, #2b59ff 0%, #6b5bff 100%);
  --grad-teal: linear-gradient(135deg, #0fb5a6 0%, #12b886 100%);
  --grad-warm: linear-gradient(135deg, #f6b73c 0%, #ef7c4b 100%);
  --grad-cool: linear-gradient(135deg, #38bdf8 0%, #2b59ff 100%);

  --shadow-xs: 0 1px 2px rgba(12, 26, 46, .05);
  --shadow-sm: 0 1px 3px rgba(12, 26, 46, .06), 0 6px 18px -12px rgba(12, 26, 46, .18);
  --shadow-md: 0 2px 6px rgba(12, 26, 46, .05), 0 18px 40px -22px rgba(12, 26, 46, .28);
  --shadow-lg: 0 24px 70px -24px rgba(12, 26, 46, .34);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sans: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .68, .3, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(43, 89, 255, .16); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6dfee; border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c2cee2; }

.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-14 { width: 14px; height: 14px; }
.ico-16 { width: 16px; height: 16px; }
.ico-20 { width: 20px; height: 20px; }
.ico-28 { width: 28px; height: 28px; }

/* ============================================================ 登录 */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  background: var(--surface);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 54px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(1200px 600px at 8% 0%, #eef3ff 0%, rgba(238, 243, 255, 0) 62%),
    radial-gradient(900px 500px at 90% 110%, #eefaf8 0%, rgba(238, 250, 248, 0) 60%),
    linear-gradient(160deg, #f7f9ff 0%, #eef3fc 100%);
  border-right: 1px solid var(--line);
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(43, 89, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 89, 255, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 78%);
  pointer-events: none;
}

.auth-art {
  position: absolute;
  right: -110px;
  bottom: -120px;
  width: 620px;
  height: 620px;
  opacity: .9;
  pointer-events: none;
}

.brandmark { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brandmark .logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  box-shadow: 0 8px 20px -8px rgba(43, 89, 255, .6);
}
.brandmark .logo svg { width: 22px; height: 22px; }
.brandmark .name { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.brandmark .sub { font-size: 11px; color: var(--ink-3); letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }

.auth-copy { position: relative; z-index: 2; max-width: 470px; }
.auth-copy .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); background: rgba(43, 89, 255, .08);
  border: 1px solid rgba(43, 89, 255, .14);
  padding: 5px 11px; border-radius: 99px; margin-bottom: 22px;
}
.auth-copy h1 { font-size: 40px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; }
.auth-copy h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #2b59ff 10%, #7c5cff 60%, #0fb5a6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-copy p { margin-top: 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; max-width: 400px; }

.auth-stats { position: relative; z-index: 2; display: flex; gap: 34px; }
.auth-stats .st { display: flex; flex-direction: column; gap: 2px; }
.auth-stats .st b { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.auth-stats .st span { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.auth-stats .st b i { font-style: normal; font-size: 13px; color: var(--brand); margin-left: 2px; }

.auth-panel { display: grid; place-items: center; padding: 40px 32px; background: #fff; }
.auth-card { width: 100%; max-width: 392px; animation: rise .5s var(--ease) both; }
.auth-card h2 { font-size: 25px; letter-spacing: -.025em; }
.auth-card .lead { color: var(--ink-3); font-size: 13.5px; margin-top: 6px; margin-bottom: 28px; }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; letter-spacing: .01em; }
.auth-input {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fcfdff; color: var(--ink-3);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.auth-input:focus-within { border-color: rgba(43, 89, 255, .55); background: #fff; box-shadow: 0 0 0 4px rgba(43, 89, 255, .1); }
.auth-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--ink); font-family: inherit; height: 100%;
}
.auth-input input::placeholder { color: var(--ink-4); }

.auth-btn {
  width: 100%; height: 46px; margin-top: 6px;
  border: 0; border-radius: var(--r-md); cursor: pointer;
  background: var(--grad-brand); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 10px 24px -12px rgba(43, 89, 255, .8);
  transition: transform .16s var(--ease), box-shadow .2s, filter .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-btn:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 16px 30px -14px rgba(43, 89, 255, .85); }
.auth-btn:active { transform: translateY(0); }
.auth-btn[disabled] { opacity: .7; cursor: default; transform: none; }

.auth-msg {
  margin-top: 14px; font-size: 13px; padding: 10px 12px; border-radius: 10px;
  display: none;
}
.auth-msg.show { display: block; animation: rise .2s var(--ease); }
.auth-msg.err { background: #fff1f3; color: #c0233f; border: 1px solid #ffd7de; }

.auth-hint {
  margin-top: 26px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2);
}
.auth-hint .t { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); margin-bottom: 7px; font-size: 12px; }
.auth-hint code { font-family: var(--mono); background: #fff; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }
.auth-hint .row { display: flex; justify-content: space-between; padding: 2px 0; }
.auth-foot { margin-top: 28px; font-size: 11.5px; color: var(--ink-4); display: flex; justify-content: space-between; }

/* ============================================================ 应用框架 */

.shell { display: grid; grid-template-columns: 246px 1fr; height: 100vh; overflow: hidden; }

.sidebar {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 14px 14px;
  overflow-y: auto;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.sb-brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand);
  display: grid; place-items: center; box-shadow: 0 6px 16px -8px rgba(43, 89, 255, .8);
}
.sb-brand .logo svg { width: 19px; height: 19px; }
.sb-brand .name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.sb-brand .tag { font-size: 10px; color: var(--ink-4); letter-spacing: .12em; text-transform: uppercase; }

.sb-group { margin-bottom: 6px; }
.sb-label {
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-4); padding: 14px 10px 6px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: background .16s var(--ease), color .16s;
}
.sb-item:hover { background: #f6f8fd; color: var(--ink); }
.sb-item.active { background: linear-gradient(90deg, #eef3ff, #f7f9ff); color: var(--brand); font-weight: 600; }
.sb-item.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--grad-brand);
}
.sb-item .ico { width: 17px; height: 17px; opacity: .85; }
.sb-item.active .ico { opacity: 1; }
.sb-item .badge {
  margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 1px 6px;
  border-radius: 99px; background: #eef1f7; color: var(--ink-2);
}
.sb-item.active .badge { background: rgba(43, 89, 255, .12); color: var(--brand); }

.sb-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.sb-user:hover { background: var(--bg-soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(140deg, #e8eeff, #f3f0ff); color: var(--brand);
  border: 1px solid rgba(43, 89, 255, .14);
}
.sb-user .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.sb-user .rl { font-size: 11px; color: var(--ink-3); }
.sb-user .out { margin-left: auto; color: var(--ink-4); cursor: pointer; padding: 5px; border-radius: 7px; }
.sb-user .out:hover { background: #fdeef1; color: var(--rose); }

.main { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.topbar {
  height: 62px; flex: none;
  display: flex; align-items: center; gap: 18px;
  padding: 0 26px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.crumb b { color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.crumb .sep { color: var(--ink-4); }
.top-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; width: 268px;
  background: #f6f8fc; border: 1px solid transparent; border-radius: 10px;
  color: var(--ink-3); transition: all .18s var(--ease);
}
.top-search:focus-within { background: #fff; border-color: rgba(43, 89, 255, .4); box-shadow: 0 0 0 3px rgba(43, 89, 255, .08); }
.top-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; font-family: inherit; color: var(--ink); }
.top-search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--ink-4);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: #fff;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); display: grid; place-items: center;
  cursor: pointer; transition: all .16s var(--ease); position: relative;
}
.icon-btn:hover { border-color: #cfd9ea; color: var(--ink); box-shadow: var(--shadow-xs); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); border: 1.5px solid #fff; }

.view { flex: 1; overflow-y: auto; padding: 24px 26px 40px; scroll-behavior: smooth; }
.view > * { animation: rise .34s var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ 通用组件 */

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; letter-spacing: -.025em; }
.page-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-head h3 { font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.card-head .hint { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.card-body { padding: 16px 18px 18px; }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 550; font-family: inherit;
  border: 1px solid transparent; white-space: nowrap;
  transition: all .16s var(--ease);
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(43, 89, 255, .9); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #cfd9ea; color: var(--ink); background: #fdfefe; }
.btn-soft { background: var(--brand-50); color: var(--brand); border-color: rgba(43, 89, 255, .12); }
.btn-soft:hover { background: #e6eeff; }
.btn-danger { background: #fff1f3; border-color: #ffd7de; color: #c0233f; }
.btn-danger:hover { background: #ffe6eb; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 23px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 550; white-space: nowrap;
  background: #f1f4f9; color: var(--ink-2);
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tone-new { background: #eef3ff; color: #2b59ff; }
.tone-contact { background: #eef6ff; color: #1877c9; }
.tone-quote { background: #fff6e6; color: #b57608; }
.tone-sample { background: #f4efff; color: #7048d8; }
.tone-nego { background: #fff0e8; color: #c2652a; }
.tone-won { background: #e9f9f1; color: #0d8a5c; }
.tone-lost { background: #f4f6f9; color: #8b97a8; }
.tone-high { background: #ffeef1; color: #d12845; }
.tone-mid { background: #fff6e6; color: #b57608; }
.tone-low { background: #f2f5f9; color: #7b8ba1; }
.tone-brand { background: var(--brand-50); color: var(--brand); }
.tone-teal { background: #e7f9f5; color: #0a8f84; }
.tone-mono { background: #f1f4f9; color: #465873; font-family: var(--mono); font-size: 11px; letter-spacing: -.02em; }

.chip-src {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  background: #f4f7fc; color: var(--ink-2); border: 1px solid var(--line-2);
}
.chip-src.geo { background: #f0efff; color: #6b4bd6; border-color: #e5e0ff; }
.chip-src.seo { background: #e9f7f5; color: #0a8f84; border-color: #d6f1ec; }
.chip-src.ads { background: #fff2ea; color: #c2652a; border-color: #ffe3d1; }
.chip-src.展会 { background: #fdf0f6; color: #b33a6d; border-color: #fbe0ec; }

.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > label .req { color: var(--rose); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fcfdff; color: var(--ink);
  font-size: 13.5px; font-family: inherit; outline: 0;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.textarea { height: auto; min-height: 78px; padding: 9px 11px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(43, 89, 255, .5); background: #fff; box-shadow: 0 0 0 3px rgba(43, 89, 255, .09);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237d8ca6' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.readonly-note { font-size: 11px; color: var(--ink-4); margin-top: 4px; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 15px 16px 13px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d8e2f2; }
.kpi::after {
  content: ""; position: absolute; right: -46px; top: -52px; width: 128px; height: 128px;
  border-radius: 50%; opacity: .5; pointer-events: none;
  background: radial-gradient(circle, var(--tint, rgba(43, 89, 255, .16)), transparent 68%);
}
.kpi .k-top { display: flex; align-items: center; gap: 8px; }
.kpi .k-ico {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--tint-soft, #eef3ff); color: var(--tone, var(--brand));
}
.kpi .k-ico .ico { width: 14px; height: 14px; }
.kpi .k-label { font-size: 12px; color: var(--ink-2); font-weight: 500; letter-spacing: .01em; }
.kpi .k-value {
  font-size: 25px; font-weight: 650; letter-spacing: -.03em; line-height: 1.25;
  margin-top: 9px; font-variant-numeric: tabular-nums;
}
.kpi .k-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.kpi .k-foot { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; color: var(--ink-3); }
.kpi .delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--rose); }
.kpi .spark { position: absolute; right: 12px; bottom: 10px; opacity: .8; }

.dash-grid { display: grid; grid-template-columns: 1.62fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.legend .it { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.legend .sw { width: 8px; height: 8px; border-radius: 3px; }

.chart-host { position: relative; width: 100%; }
.chart-host svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: rgba(12, 26, 46, .94); color: #fff; border-radius: 9px;
  padding: 8px 10px; font-size: 11.5px; line-height: 1.5;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  transform: translate(-50%, -112%); opacity: 0; transition: opacity .12s;
  white-space: nowrap;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-weight: 600; }
.chart-tip .r { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.chart-tip .r .l { display: flex; align-items: center; gap: 5px; color: #c9d3e2; }
.chart-tip .sw { width: 6px; height: 6px; border-radius: 2px; }

/* 表格 */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-lg); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.4px; }
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); background: #fafbfe;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr { transition: background .14s; cursor: default; }
.tbl tbody tr:hover { background: #f8faff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .cell-main { font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.tbl .cell-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.tbl .ta-r { text-align: right; }
.tbl td.ta-r, .tbl th.ta-r { text-align: right; }
.row-link { cursor: pointer; }
.row-link:hover .cell-main { color: var(--brand); }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.toolbar .search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; min-width: 240px; color: var(--ink-3);
}
.toolbar .search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13.2px; font-family: inherit; color: var(--ink); }
.toolbar .select { width: auto; min-width: 116px; height: 34px; font-size: 13px; }

.seg { display: inline-flex; padding: 3px; background: #eef1f7; border-radius: 9px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 0 11px; height: 26px; border-radius: 7px;
  font-size: 12px; color: var(--ink-2); cursor: pointer; font-weight: 500; transition: all .15s;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); font-weight: 600; }

.empty { padding: 52px 20px; text-align: center; color: var(--ink-3); }
.empty .ico { width: 34px; height: 34px; color: var(--ink-4); margin-bottom: 10px; }
.empty .t { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.empty .s { font-size: 12.5px; margin-top: 3px; }

.pager { display: flex; align-items: center; gap: 10px; padding: 12px 4px 0; font-size: 12.5px; color: var(--ink-2); }
.pager .pages { margin-left: auto; display: flex; gap: 5px; }
.pager .pg {
  min-width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12px; cursor: pointer; padding: 0 8px;
}
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .pg:disabled { opacity: .45; cursor: default; }

/* 弹窗 */
.backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(12, 26, 46, .34);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  padding: 26px; animation: fade .18s var(--ease);
}
.modal {
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .24s var(--ease);
  border: 1px solid rgba(255, 255, 255, .6);
}
.modal.wide { max-width: 820px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16px; letter-spacing: -.015em; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px 20px; border-top: 1px solid var(--line-2); }

/* Toast */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 15px; border-radius: 11px; font-size: 13px;
  background: #0c1a2e; color: #fff; box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .5);
  animation: slideIn .26s var(--ease); max-width: 380px;
}
.toast.ok { background: #0f7a52; }
.toast.err { background: #b3203c; }
.toast .ico { width: 15px; height: 15px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* 客户详情 */
.detail-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(135deg, #fbfcff 0%, #f4f7ff 100%);
  padding: 22px 24px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.detail-hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(43, 89, 255, .12), transparent 65%); pointer-events: none;
}
.dh-top { display: flex; align-items: flex-start; gap: 16px; position: relative; z-index: 2; }
.dh-logo {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 18px; font-weight: 700; color: var(--brand); box-shadow: var(--shadow-xs);
}
.dh-name { font-size: 21px; letter-spacing: -.025em; line-height: 1.3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dh-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 7px; font-size: 12px; color: var(--ink-2); }
.dh-meta .it { display: flex; align-items: center; gap: 5px; }
.dh-meta .ico { width: 13px; height: 13px; color: var(--ink-4); }
.dh-metrics { display: flex; gap: 30px; margin-top: 18px; position: relative; z-index: 2; flex-wrap: wrap; }
.dh-m { }
.dh-m .l { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.dh-m .v { font-size: 18px; font-weight: 650; letter-spacing: -.02em; margin-top: 1px; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 9px 13px 11px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; font-family: inherit;
}
.tabs button.on { color: var(--brand); font-weight: 600; }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.tabs .count { font-size: 10.5px; background: #f1f4f9; color: var(--ink-2); padding: 1px 6px; border-radius: 99px; margin-left: 5px; }

.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.kv { padding: 11px 14px; border-bottom: 1px solid var(--line-2); background: #fff; }
.kv:nth-child(odd) { border-right: 1px solid var(--line-2); }
.kv .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.kv .v { font-size: 13.5px; color: var(--ink); font-weight: 500; word-break: break-word; }
.kv.full { grid-column: 1 / -1; border-right: 0; }
.prose { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1.5px; background: linear-gradient(#dbe4f3, #eef2f9); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid #c9d6ec;
}
.tl-item.hot::before { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 89, 255, .12); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-date { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-body { margin-top: 5px; font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.tl-next { margin-top: 7px; font-size: 12px; color: var(--ink-2); background: #f7f9fd; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 9px; display: inline-flex; gap: 6px; align-items: center; }

/* 看板 */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kcol {
  width: 236px; flex: none; background: #f7f9fd; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px; min-height: 200px;
  transition: background .15s, border-color .15s;
}
.kcol.over { background: #eef3ff; border-color: rgba(43, 89, 255, .35); }
.kcol-head { display: flex; align-items: center; gap: 7px; padding: 2px 4px 10px; }
.kcol-head .t { font-size: 12.5px; font-weight: 600; }
.kcol-head .n { font-size: 10.5px; color: var(--ink-3); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.kcol-head .bar { margin-left: auto; font-size: 10.5px; color: var(--ink-4); }
.kcard {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px; margin-bottom: 8px; cursor: grab;
  box-shadow: var(--shadow-xs); transition: all .16s var(--ease);
}
.kcard:hover { border-color: #cfdaea; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard .c-name { font-size: 12.8px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.kcard .c-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 10.5px; color: var(--ink-3); flex-wrap: wrap; }
.kcard .c-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line-2); font-size: 11px; }
.kcard .c-amt { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 识别上传 */
.scan-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.dropzone {
  border: 1.5px dashed #c9d6ea; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #fdfeff, #f8fbff);
  padding: 34px 22px; text-align: center; cursor: pointer;
  transition: all .2s var(--ease); position: relative;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: #f4f8ff; box-shadow: inset 0 0 0 3px rgba(43, 89, 255, .05); }
.dropzone .dz-ico {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 15px;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--brand); box-shadow: var(--shadow-sm);
}
.dropzone .dz-t { font-size: 14px; font-weight: 600; }
.dropzone .dz-s { font-size: 12px; color: var(--ink-3); margin-top: 5px; line-height: 1.7; }
.dz-types { display: flex; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

.file-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 7px;
}
.file-item .fi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f3f7ff; color: var(--brand); flex: none; }
.file-item .fi-name { font-size: 12.5px; font-weight: 550; }
.file-item .fi-meta { font-size: 10.5px; color: var(--ink-4); }
.file-item .fi-act { margin-left: auto; display: flex; gap: 4px; }
.thumb { width: 74px; height: 74px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: zoom-in; }

.ocr-text {
  width: 100%; min-height: 168px; max-height: 320px; overflow-y: auto;
  font-family: var(--mono); font-size: 11.8px; line-height: 1.75;
  background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; white-space: pre-wrap; word-break: break-word; color: var(--ink-2);
}
.parsed-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.parsed-row .pk { width: 96px; flex: none; color: var(--ink-3); font-size: 11.5px; }
.parsed-row .pv { flex: 1; font-weight: 500; word-break: break-all; }
.conf { width: 42px; flex: none; height: 4px; border-radius: 99px; background: #eef1f7; overflow: hidden; }
.conf i { display: block; height: 100%; border-radius: 99px; background: var(--grad-teal); }

.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-4); }
.step .n { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: #eef1f7; color: var(--ink-3); font-weight: 600; }
.step.on { color: var(--ink); font-weight: 600; }
.step.on .n { background: var(--grad-brand); color: #fff; }
.step.done .n { background: #e9f9f1; color: var(--green); }
.step-line { flex: 1; height: 1px; background: var(--line); }

/* 设置 */
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.acc-row:last-child { border-bottom: 0; }
.acc-row .a-name { font-size: 13px; font-weight: 600; }
.acc-row .a-sub { font-size: 11px; color: var(--ink-4); }
.acc-row .a-role { margin-left: auto; }
.switch { position: relative; width: 34px; height: 19px; border-radius: 99px; background: #dde4ef; border: 0; cursor: pointer; transition: background .18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s var(--ease); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(15px); }

.log-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.log-row .lt { color: var(--ink-3); font-variant-numeric: tabular-nums; width: 116px; flex: none; font-size: 11.5px; }
.log-row .lu { color: var(--ink-2); width: 130px; flex: none; }
.log-row .la { color: var(--brand); width: 76px; flex: none; font-weight: 500; }
.log-row .ld { color: var(--ink-3); flex: 1; }

.banner {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 11px; font-size: 13px; margin-bottom: 14px;
  background: #f4f8ff; border: 1px solid #dce7ff; color: #274b9e;
}
.banner.warn { background: #fffaef; border-color: #ffe9bd; color: #8a5c05; }
.banner .ico { width: 15px; height: 15px; flex: none; }

/* 骨架 */
.skel { background: linear-gradient(90deg, #eef2f8 25%, #f6f9fd 37%, #eef2f8 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* 响应式 */
@media (max-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .shell { grid-template-columns: 68px 1fr; }
  .sb-brand .name, .sb-brand .tag, .sb-label, .sb-item span, .sb-user .nm, .sb-user .rl, .sb-item .badge { display: none; }
  .sb-item { justify-content: center; padding: 0; }
  .sb-item.active::before { left: -14px; }
  .dash-grid, .scan-grid { grid-template-columns: 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr 1fr; }
  .sb-user { justify-content: center; }
  .sb-user .out { display: none; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .view { padding: 16px; }
  .topbar { padding: 0 16px; }
  .top-search { display: none; }
  .kv-grid { grid-template-columns: 1fr; }
  .kv:nth-child(odd) { border-right: 0; }
}

/* ================= v1.1 增量：品牌 LOGO / 勾选批量 / 区号识别 / 转移记录 ================= */

.brandmark .logo { background: #fff; box-shadow: none; width: auto; height: 58px; padding: 0 2px; }
.brandmark .logo img { height: 100%; width: auto; display: block; }

.sb-brand .logo { background: #fff; overflow: hidden; }
.sb-brand .logo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }

.dial-hint {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 5px; font-size: 11px; font-weight: 600; color: #0a8f84;
  background: #e9f9f6; border: 1px solid rgba(15, 181, 166, .25);
  padding: 3px 9px; border-radius: 99px;
}
.dial-hint.miss { color: #5f6d86; background: #f6f8fc; border-color: var(--line-2); }
.dial-hint svg { width: 12px; height: 12px; }

.cell-check { width: 38px; text-align: center; }
.cell-check input,
.head-check { width: 15px; height: 15px; accent-color: #2b59ff; cursor: pointer; display: block; margin: 0 auto; }

.batchbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, #eef3ff, #f7f9ff);
  border: 1px solid rgba(43, 89, 255, .18);
  border-radius: var(--r-lg); padding: 10px 16px; margin-bottom: 12px;
  animation: bbIn .18s ease-out;
}
@keyframes bbIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.batchbar .cnt { font-size: 13px; font-weight: 650; color: var(--brand); }
.batchbar .cnt b { font-size: 15px; }
.batchbar .hint { font-size: 11.5px; color: var(--ink-4); }

.ocr-drop-mini { padding: 14px 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.ocr-drop-mini .dz-ico { width: 38px; height: 38px; margin: 0; flex: none; }
.ocr-drop-mini .dz-t { font-size: 12.5px; }
.ocr-drop-mini .dz-s { font-size: 11px; }
.ocr-drop-mini .ocr-status { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.ocr-drop-mini.over { border-color: var(--brand); background: #eef3ff; }
.ocr-bar { width: 90px; height: 4px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.ocr-bar i { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, #2b59ff, #0fb5a6); transition: width .2s; }

.tr-list { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.tr-list .tr-title { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 8px; }
.tr-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 5px 0; }
.tr-item .t { color: var(--ink-4); font-size: 11px; white-space: nowrap; }
.tr-item .arrow { color: var(--brand); font-weight: 700; }
.tr-item .note { color: var(--ink-4); }

/* ================= v1.2：账号权限 / 背调 / 跟进提醒 / 订单税额 ================= */

/* 跟进提醒浮层 */
.rem-dock {
  position: fixed; right: 22px; bottom: 22px; width: 322px; z-index: 60;
  background: #fff; border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: 0 24px 60px -24px rgba(16, 32, 64, .35), 0 2px 8px rgba(16, 32, 64, .06);
  overflow: hidden; animation: remIn .22s ease-out;
}
@keyframes remIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rem-dock.urgent { border-color: rgba(239, 75, 106, .35); }
.rem-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; background: linear-gradient(180deg, #f7f9ff, #fff); }
.rem-dock.urgent .rem-head { background: linear-gradient(180deg, #fff3f5, #fff); }
.rem-title { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); flex: 1; }
.rem-dock.urgent .rem-title .ico { color: #e0415f; }
.rem-badge { background: #2b59ff; color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.rem-dock.urgent .rem-badge { background: #e0415f; }
.rem-min { border: 0; background: transparent; color: var(--ink-4); cursor: pointer; display: flex; padding: 2px; }
.rem-meta { display: flex; gap: 6px; padding: 0 14px 10px; }
.rem-meta .rm { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.rem-meta .over { background: #ffe9ee; color: #c0233f; }
.rem-meta .today { background: #fff2e2; color: #b57608; }
.rem-meta .soon { background: #eef3ff; color: #2b59ff; }
.rem-list { max-height: 268px; overflow-y: auto; padding: 0 8px 6px; }
.rem-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; border-left: 3px solid #dfe6f2; margin-bottom: 4px; background: #fbfcff; }
.rem-item:hover { background: #f4f7ff; }
.rem-item.overdue { border-left-color: #e0415f; background: #fff8f9; }
.rem-item.today { border-left-color: #eba51c; background: #fffcf5; }
.rem-item.soon { border-left-color: #2b59ff; }
.rem-item .ri-main { min-width: 0; flex: 1; }
.rem-item .ri-name { font-size: 12.3px; font-weight: 600; color: var(--ink); }
.rem-item .ri-sub { font-size: 10.8px; color: var(--ink-4); margin-top: 2px; }
.rem-item .ri-days { font-weight: 650; color: #5f6d86; }
.rem-item.overdue .ri-days { color: #c0233f; }
.rem-item.today .ri-days { color: #b57608; }
.rem-empty { padding: 16px 10px; text-align: center; font-size: 11.5px; color: var(--ink-4); }
.rem-foot { padding: 8px 14px 10px; font-size: 10.5px; color: var(--ink-4); border-top: 1px solid var(--line-2); background: #fcfdff; line-height: 1.5; }
.rem-dock.collapsed { width: auto; border-radius: 99px; }
.rem-pill { position: relative; display: flex; align-items: center; gap: 6px; border: 0; background: #fff; padding: 10px 14px; cursor: pointer; font-size: 12.5px; font-weight: 650; color: #e0415f; }
.rem-pill .dot { position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #e0415f; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ================= v1.3：全界面紧急跟进条 + 强制提醒弹窗 ================= */

.urgent-bar {
  flex: none; position: relative; z-index: 40;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 22px; min-height: 46px;
  color: #fff; overflow: hidden;
  background: linear-gradient(96deg, #a71b36 0%, #d92b4c 46%, #ef4b6a 100%);
  box-shadow: 0 3px 16px -6px rgba(167, 27, 54, .55);
}
.urgent-bar[data-level="today"] {
  background: linear-gradient(96deg, #a06a05 0%, #d99a12 46%, #eba51c 100%);
  box-shadow: 0 3px 16px -6px rgba(160, 106, 5, .45);
}
.urgent-bar .ub-pulse {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #fff; animation: ubPulse 1.5s ease-in-out infinite;
}
@keyframes ubPulse { 0%, 100% { opacity: .2; } 50% { opacity: .95; } }
.urgent-bar .ub-ico {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
}
.urgent-bar .ub-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 7px; font-size: 12.6px; }
.urgent-bar .ub-text b { font-size: 13.2px; font-weight: 700; letter-spacing: -.01em; }
.urgent-bar .ub-sep { opacity: .6; }
.urgent-bar .ub-names {
  font-size: 11.6px; color: rgba(255, 255, 255, .88); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 46%;
}
.urgent-bar .ub-btn {
  flex: none; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16);
  color: #fff; font-family: inherit; font-size: 12px; font-weight: 650; padding: 6px 14px;
  border-radius: 8px; cursor: pointer; transition: all .16s var(--ease);
}
.urgent-bar .ub-btn:hover { background: #fff; color: #b02240; border-color: #fff; }
.urgent-bar[data-level="today"] .ub-btn:hover { color: #8a5b05; }

/* 强制提醒弹窗 */
.gate-note {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 12px;
  background: #fff5f7; border: 1px solid #ffd9e1; border-radius: 10px;
  font-size: 12px; color: #a32442; line-height: 1.6;
}
.gate-note .ico { flex: none; margin-top: 1px; color: #d92b4c; }
.gate-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.gate-item {
  border: 1px solid var(--line-2); border-left: 3px solid #e0415f; border-radius: 11px;
  padding: 10px 12px; background: #fffafb;
}
.gate-item.today { border-left-color: #eba51c; background: #fffcf5; }
.gate-item .gi-top { display: flex; align-items: center; gap: 8px; }
.gate-item .gi-top b { flex: 1; min-width: 0; font-size: 13px; color: var(--ink); }
.gate-item .gi-days { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #ffe3ea; color: #b01f3c; white-space: nowrap; }
.gate-item.today .gi-days { background: #fff0db; color: #a06a05; }
.gate-item .gi-meta { margin-top: 3px; font-size: 11.3px; color: var(--ink-3); }
.gate-item .gi-act { margin-top: 8px; display: flex; gap: 6px; justify-content: flex-end; }

@media (max-width: 900px) {
  .urgent-bar { padding: 9px 14px; }
  .urgent-bar .ub-names { display: none; }
  .urgent-bar .ub-text { flex-wrap: wrap; }
}

/* 背调评分环 */
.score-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; margin: 4px 0 2px; }
.score-ring .sr-num { position: absolute; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.score-ring .sr-num i { font-style: normal; font-size: 11px; color: var(--ink-4); font-weight: 500; margin-left: 1px; }
.check-row { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.check-row:last-child { border-bottom: 0; }
.ck-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; }
.ck-dot.ok { background: #0fb5a6; }
.ck-dot.warn { background: #eba51c; }
.ck-dot.risk { background: #e0415f; }
.ck-t { font-size: 12.3px; font-weight: 600; color: var(--ink); display: flex; align-items: center; }
.ck-v { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.ck-n { font-size: 11px; color: var(--ink-4); margin-top: 2px; line-height: 1.55; }
.risk-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.risk-row:last-child { border-bottom: 0; }
.risk-t { font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.cert-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cert { font-size: 10.8px; color: #465873; background: #f4f7fd; border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 99px; }
.pay-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 10px; font-size: 11.3px; color: var(--ink-3); background: #f8fafd; padding: 8px 10px; border-radius: 9px; line-height: 1.6; }
.q-row { display: flex; gap: 9px; font-size: 12.2px; color: var(--ink-2); line-height: 1.65; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.q-row:last-child { border-bottom: 0; }
.q-n { width: 18px; height: 18px; border-radius: 50%; background: #eef3ff; color: #2b59ff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 2px; }
.q-n.dot { background: #e9f9f6; color: #0a8f84; }

/* 权限矩阵 */
.perm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 8px; flex-wrap: wrap; }
.perm-head b { font-size: 13px; }
.perm-head .hint { font-size: 11px; color: var(--ink-4); margin-left: 8px; }
.perm-tools { display: flex; gap: 6px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.perm-group { background: #fafcff; border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; }
.pg-title { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 6px; }
.perm-item { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; }
.perm-item input { margin-top: 3px; width: 14px; height: 14px; accent-color: #2b59ff; }
.perm-item b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.perm-item i { display: block; font-style: normal; font-size: 10.8px; color: var(--ink-4); line-height: 1.5; margin-top: 1px; }
.perm-count { font-size: 10.8px; font-weight: 700; color: #2b59ff; background: #eef3ff; padding: 1px 8px; border-radius: 99px; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-card { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; background: #fcfdff; }
.rc-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.rc-head .mono { font-size: 10.5px; color: var(--ink-4); }
.rc-n { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.rc-perms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.sum-l { color: #5f6d86; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }

@media (max-width: 900px) {
  .rem-dock { right: 12px; left: 12px; width: auto; bottom: 12px; }
  .perm-grid, .role-grid { grid-template-columns: 1fr; }
}

/* ================= v1.3：背调简报 / 客户分级 / 列表徽章 ================= */

.grade {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; border-radius: 5px;
  font-size: 10px; font-weight: 800; vertical-align: 1px; letter-spacing: 0;
}
.grade-A { background: #e4f8f2; color: #0a8f84; }
.grade-B { background: #eaf0ff; color: #2b59ff; }
.grade-C { background: #fff4e2; color: #b57608; }

.tier-row { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.tier-badge {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: #eef2f9; color: #5b6a83;
}
.tier-badge.t-S { background: #e7f7f2; color: #0a8f84; }
.tier-badge.t-A { background: #eaf0ff; color: #2b59ff; }
.tier-badge.t-B { background: #f2f5fa; color: #5b6a83; }
.tier-badge.t-C { background: #fff4e2; color: #a06a05; }
.tier-badge.risk-high { background: #ffe9ee; color: #b01f3c; }
.tier-badge.risk-mid { background: #fff2e2; color: #a06a05; }
.tier-badge.risk-low { background: #eaf7f0; color: #0f8a5c; }

.brief-box {
  font-size: 12.6px; line-height: 1.85; color: var(--ink-2);
  background: linear-gradient(180deg, #f8faff, #fdfeff);
  border: 1px solid var(--line-2); border-left: 3px solid var(--brand);
  border-radius: 10px; padding: 12px 14px;
}
.demand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.dm { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; }
.dm-k { display: block; font-size: 10.3px; color: var(--ink-4); letter-spacing: .04em; margin-bottom: 3px; }
.dm b { font-size: 13.5px; color: var(--ink); letter-spacing: -.01em; }
.brief-tip {
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 10.8px; color: var(--ink-4); line-height: 1.5;
}
.prod-row {
  display: flex; align-items: flex-start; gap: 9px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
}
.prod-row:last-child { border-bottom: 0; }
.pr-ico {
  flex: none; width: 26px; height: 26px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; background: #eef3ff; color: var(--brand);
}
.pr-name { font-size: 12.6px; font-weight: 650; color: var(--ink); }
.pr-why { font-size: 11.2px; color: var(--ink-3); line-height: 1.55; margin-top: 2px; }

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

/* v1.3：访问地址 / 备份列表 */
.addr-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.addr-row:last-of-type { border-bottom: 0; }
.addr-row .ad-k { flex: none; width: 62px; font-size: 10.6px; color: var(--ink-4); letter-spacing: .04em; }
.addr-row .ad-v { flex: 1; min-width: 0; font-size: 12px; color: var(--ink); background: #f7f9fd; border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-list { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 6px; }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 11.4px; color: var(--ink-2); }
.bk-row .muted { color: var(--ink-4); font-size: 10.8px; }
