:root {
  --blue: #1B6BFF;
  --blue-2: #2A7BFF;
  --blue-soft: #EAF1FF;
  --navy: #0B1739;
  --navy-2: #12224C;
  --bg: #F4F7FC;
  --card: #FFFFFF;
  --text: #0F1B33;
  --text-2: #39496B;
  --muted: #6B7A99;
  --line: #E6ECF7;
  --orange: #FF7A1A;
  --orange-soft: #FFF2E8;
  --green: #12B76A;
  --green-soft: #E9F9F1;
  --red: #E5484D;
  --red-soft: #FDECEC;
  --purple: #7C3AED;
  --radius: 16px;
  --shadow: 0 6px 22px rgba(15, 27, 51, .06);
  --shadow-lg: 0 24px 60px rgba(15, 27, 51, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  background: #fff;
}
.login-brand {
  position: relative;
  overflow: hidden;
  padding: 54px 62px;
  color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #1E4FD8 0%, #0B1739 58%, #060F26 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-top { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .5px; font-size: 17px; }
.logo-mark {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2A7BFF, #0E3EA8);
  box-shadow: 0 10px 26px rgba(18, 60, 170, .45);
}
.logo-mark.small { width: 38px; height: 38px; border-radius: 11px; box-shadow: none; }
.login-brand h1 {
  font-size: 42px; line-height: 1.28; font-weight: 700; letter-spacing: 1px;
  margin: 46px 0 20px;
}
.brand-sub { color: rgba(255,255,255,.66); font-size: 15px; line-height: 1.9; }
.brand-feats { margin-top: 40px; display: grid; gap: 16px; }
.feat { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.9); font-size: 14px; }
.feat-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: rgba(42,123,255,.25);
  border: 1px solid rgba(120,170,255,.5);
  position: relative;
}
.feat-dot::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #6FA6FF;
}
.brand-foot { margin-top: 52px; color: rgba(255,255,255,.4); font-size: 12px; letter-spacing: .5px; }
.brand-deco {
  position: absolute; right: -160px; bottom: -180px; width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,123,255,.5), rgba(42,123,255,0) 66%);
  pointer-events: none;
}
.login-form-side { display: grid; place-items: center; padding: 40px 28px; background: #fff; }
.login-card { width: 100%; max-width: 388px; }
.login-card h2 { font-size: 26px; margin-bottom: 8px; }
.login-card > .muted { font-size: 13px; margin-bottom: 32px; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
.field input, .field select, .field textarea, .input {
  width: 100%; border: 1px solid var(--line); background: #F8FAFE;
  border-radius: 11px; padding: 12px 14px; outline: none;
  transition: .18s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(27,107,255,.1);
}
textarea { resize: vertical; min-height: 84px; }
.form-err { color: var(--red); font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.demo-row { display: flex; align-items: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; font-size: 12px; }
.login-hint { margin-top: 26px; font-size: 12px; color: #9AA8C2; }

/* ---------------- 布局 ---------------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }

/* 顶部横向导航栏（由原左侧栏改造而来） */
.sidebar {
  width: 100%; flex: none; background: var(--navy); color: #fff;
  display: flex; flex-direction: row; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 50; height: 64px; padding: 0 22px;
  box-shadow: 0 4px 18px rgba(9,18,40,.16);
}
.side-brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 0 18px 0 0; border-right: 1px solid rgba(255,255,255,.10);
}
.side-brand b { display: block; font-size: 15px; letter-spacing: .4px; white-space: nowrap; }
.side-brand small { display: block; color: rgba(255,255,255,.42); font-size: 10.5px; margin-top: 1px; white-space: nowrap; }
.nav {
  display: flex; flex-direction: row; align-items: center; gap: 3px;
  flex: 1; min-width: 0; height: 100%; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 9px;
  color: rgba(255,255,255,.62); font-size: 13px; white-space: nowrap; flex: none;
  transition: .16s; cursor: pointer; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(42,123,255,.95), rgba(42,123,255,.6)); color: #fff; box-shadow: 0 6px 16px rgba(27,107,255,.3); }
.nav-item .ico { display: grid; place-items: center; width: 18px; opacity: .95; }
.nav-sep {
  width: 1px; height: 18px; flex: none; padding: 0; margin: 0 5px;
  background: rgba(255,255,255,.14); font-size: 0; color: transparent; overflow: hidden;
}
.nav-badge {
  margin-left: 3px; background: #FF7A1A; color: #fff; font-style: normal;
  font-size: 10.5px; padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center;
}
.nav-badge:empty { display: none; }
.side-user {
  border-left: 1px solid rgba(255,255,255,.10); padding: 0 0 0 16px;
  display: flex; align-items: center; gap: 9px; flex: none;
}
.side-user b { display: block; font-size: 12.5px; white-space: nowrap; }
.side-user small { display: block; font-size: 10.5px; color: rgba(255,255,255,.45); white-space: nowrap; }
.side-user-info { min-width: 0; }
.side-user .avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2A7BFF, #1B4FD8); color: #fff; font-weight: 600; font-size: 15px;
  flex: none;
}
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; padding: 0 30px; display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 64px; z-index: 30;
}
/* 顶部导航已显示用户信息，topbar 里的头像不再重复显示 */
#top-avatar { display: none; }
.topbar-title h1 { font-size: 19px; font-weight: 600; letter-spacing: .2px; }
.topbar-title p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.collect-pill {
  display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2);
  background: #F3F7FF; border: 1px solid #E1EAFC; padding: 7px 12px; border-radius: 30px;
}
.collect-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(18,183,106,.15); }
.view { padding: 26px 30px 50px; max-width: 1420px; width: 100%; }

/* ---------------- 通用组件 ---------------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px 22px 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 10px; padding: 9px 15px; font-size: 13px; font-weight: 500;
  transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: #CBD8EE; background: #FAFCFF; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--blue-2), var(--blue));
  border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(27,107,255,.28);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: #F5F8FE; border-color: transparent; }
.btn.danger { color: var(--red); border-color: #F6D5D6; background: #fff; }
.btn.green { background: var(--green); border-color: transparent; color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn.lg { padding: 12px 22px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: 34px; height: 34px; border: 0; background: transparent; border-radius: 9px;
  display: grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { background: #EEF3FC; color: var(--text); }
.only-mobile { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 30px;
  background: #F4F7FC; border: 1px solid var(--line); font-size: 12px; color: var(--text-2);
  transition: .15s;
}
.chip:hover { border-color: #C9D8F2; }
.chip.active { background: var(--blue-soft); border-color: #C6DAFF; color: var(--blue); font-weight: 500; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.orange { background: var(--orange-soft); color: #D9600D; }
.pill.green { background: var(--green-soft); color: #0B8A4F; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.gray { background: #F1F4FA; color: var(--muted); }
.pill.purple { background: #F2ECFF; color: var(--purple); }

.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb16 { margin-bottom: 16px; }

/* KPI */
.kpi { padding: 20px 22px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .num { font-size: 27px; font-weight: 650; letter-spacing: .3px; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .num small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kpi .spark { position: absolute; right: 12px; bottom: 10px; opacity: .9; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: #FAFCFF; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: .12s; }
tbody tr:hover { background: #FAFCFF; }
td .strong { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.t-right { text-align: right; }
.t-center { text-align: center; }
.num-cell { font-variant-numeric: tabular-nums; font-weight: 600; }

/* 空状态 / 骨架 */
.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty .emoji { font-size: 34px; display: block; margin-bottom: 10px; opacity: .85; }
.empty b { display: block; color: var(--text-2); margin-bottom: 4px; font-size: 14px; }
.skeleton { background: linear-gradient(90deg, #EEF2F9 25%, #F7F9FD 37%, #EEF2F9 63%); background-size: 400% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(9, 18, 40, .48); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 100; padding: 24px; animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(.99); opacity: .6; } }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 14px; }
.modal-head h3 { font-size: 17px; }
.modal-head .sub { font-size: 12px; color: var(--muted); }
.modal-body { padding: 4px 24px 8px; overflow: auto; }
.modal-foot { padding: 16px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* toast */
#toast-root { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; }
.toast {
  background: #0F1B33; color: #fff; padding: 10px 18px; border-radius: 30px; font-size: 13px;
  box-shadow: 0 12px 30px rgba(9,18,40,.3); animation: toastIn .22s ease; display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: #0B7A4B; }
.toast.err { background: #B42318; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------- 看板 ---------------- */
.month-banner {
  display: flex; align-items: center; gap: 28px; padding: 22px 26px; color: #fff;
  background: linear-gradient(120deg, #0F2557 0%, #1647A8 55%, #1B6BFF 100%);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.month-banner::after {
  content: ""; position: absolute; right: -80px; top: -110px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
}
.month-banner .mb-label { font-size: 12.5px; opacity: .72; }
.month-banner .mb-num { font-size: 32px; font-weight: 650; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.month-banner .mb-num small { font-size: 15px; opacity: .7; font-weight: 500; }
.mb-progress { flex: 1; min-width: 140px; }
.mb-bar { height: 7px; background: rgba(255,255,255,.2); border-radius: 10px; overflow: hidden; margin-top: 10px; }
.mb-bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #7EB0FF, #fff); }
.mb-meta { display: flex; justify-content: space-between; font-size: 11.5px; opacity: .72; margin-top: 8px; }
.mb-side { text-align: right; position: relative; z-index: 1; }
.mb-side .big { font-size: 22px; font-weight: 600; color: #FFC38A; }
.mb-side .lbl { font-size: 11.5px; opacity: .7; }

.rank-list { display: grid; gap: 4px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 10px; }
.rank-row:hover { background: #FAFCFF; }
.rank-no {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; background: #F1F4FA; color: var(--muted); flex: none;
}
.rank-no.n1 { background: linear-gradient(135deg, #FFB347, #FF7A1A); color: #fff; }
.rank-no.n2 { background: #E7EDF8; color: #5A6B8C; }
.rank-no.n3 { background: #F7E8DC; color: #B4693A; }
.rank-name { flex: 1; min-width: 0; }
.rank-name b { font-size: 13px; font-weight: 500; }
.rank-name small { display: block; color: var(--muted); font-size: 11px; }
.rank-bar { width: 90px; height: 6px; background: #EEF2F9; border-radius: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6FA6FF, #1B6BFF); border-radius: 6px; }
.rank-amt { width: 82px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }

.seg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.seg-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.seg-name { width: 74px; font-size: 12.5px; }
.seg-track { flex: 1; height: 7px; border-radius: 6px; background: #F1F4FA; overflow: hidden; }
.seg-track i { display: block; height: 100%; border-radius: 6px; }
.seg-count { width: 34px; text-align: right; font-size: 12px; color: var(--muted); }
.seg-amt { width: 78px; text-align: right; font-size: 12px; font-weight: 600; }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { display: grid; gap: 9px; flex: 1; }
.donut-legend div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.donut-legend b { margin-left: auto; font-weight: 600; }

.feed { display: grid; gap: 2px; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #EEF2F9; }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: #C7D5EE; }
.feed-dot.task { background: var(--blue); }
.feed-dot.commission { background: var(--orange); }
.feed-dot.import { background: var(--green); }
.feed-body { flex: 1; min-width: 0; }
.feed-body p { font-size: 12.5px; color: var(--text-2); }
.feed-body small { font-size: 11px; color: #9AA8C2; }

/* ---------------- 客户分析 ---------------- */
.seg-card { padding: 18px 20px; cursor: pointer; transition: .16s; border: 1px solid transparent; }
.seg-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,27,51,.09); border-color: #E3ECFC; }
.seg-card .top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.seg-card .val { font-size: 25px; font-weight: 650; margin: 8px 0 2px; }
.seg-card .desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.seg-card .amt { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.seg-card .amt b { color: var(--text); font-weight: 600; }

.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box input { width: 230px; padding-left: 34px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9AA8C2; }
.select-mini {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 12px; font-size: 12.5px;
  outline: none;
}
.select-mini:focus { border-color: var(--blue); }

.health { display: inline-flex; align-items: center; gap: 7px; }
.health-track { width: 46px; height: 5px; border-radius: 5px; background: #EEF2F9; overflow: hidden; }
.health-track i { display: block; height: 100%; border-radius: 5px; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); }
.pager .info { font-size: 12px; color: var(--muted); margin-right: auto; }
.page-btn { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 12px; }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn[disabled] { opacity: .4; }

/* ---------------- 任务 ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tab {
  padding: 14px 14px 12px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; display: flex; align-items: center; gap: 6px; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.tab em { font-style: normal; font-size: 11px; background: #F1F4FA; color: var(--muted); padding: 1px 6px; border-radius: 20px; }
.tab.active em { background: var(--blue-soft); color: var(--blue); }

.task-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.task-type i {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 13px;
}
.task-title-cell b { font-weight: 500; display: block; }
.task-title-cell small { color: var(--muted); font-size: 11.5px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 4px; }
.detail-item { background: #F8FAFE; border-radius: 10px; padding: 10px 12px; }
.detail-item span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.detail-item b { font-size: 13.5px; font-weight: 600; }
.info-block { background: #F8FAFE; border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--text-2); line-height: 1.8; }
.commission-box {
  background: linear-gradient(120deg, #FFF5EC, #FFEBDC); border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.commission-box .cb-label { font-size: 12px; color: #A35A21; }
.commission-box .cb-amt { font-size: 24px; font-weight: 700; color: #D9600D; margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------------- 佣金 ---------------- */
.summary-strip { display: flex; gap: 14px; flex-wrap: wrap; }
.summary-box { background: #F8FAFE; border-radius: 12px; padding: 14px 18px; flex: 1; min-width: 140px; }
.summary-box span { font-size: 11.5px; color: var(--muted); display: block; }
.summary-box b { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; }
.summary-box b.orange { color: var(--orange); }
.summary-box b.green { color: var(--green); }

/* ---------------- 采集 ---------------- */
.dropzone {
  border: 1.5px dashed #C9D8F2; border-radius: 14px; padding: 34px 20px; text-align: center;
  background: #FAFCFF; transition: .18s; cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--blue); background: #F3F8FF; }
.dropzone .dz-icon { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); }
.dropzone b { display: block; font-size: 14px; margin-bottom: 4px; }
.dropzone span { font-size: 12px; color: var(--muted); }
.step-list { counter-reset: step; display: grid; gap: 14px; }
.step-item { display: flex; gap: 12px; }
.step-no { width: 24px; height: 24px; border-radius: 8px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.step-item b { font-size: 13px; display: block; margin-bottom: 1px; }
.step-item p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.code-inline { background: #F1F4FA; border-radius: 5px; padding: 1px 6px; font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; }

/* ---------------- 员工 ---------------- */
.staff-card { display: block; padding: 16px 18px; }
.staff-card .avatar { width: 44px; height: 44px; border-radius: 13px; }
.staff-name b { font-size: 14px; }
.staff-name small { color: var(--muted); font-size: 11.5px; display: block; }
.staff-stat { text-align: right; }
.staff-stat b { font-size: 15px; display: block; }
.staff-stat small { font-size: 11px; color: var(--muted); }

/* ---------------- 设置 ---------------- */
.setting-row { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .sr-label { width: 170px; flex: none; }
.setting-row .sr-label b { display: block; font-size: 13.5px; font-weight: 500; }
.setting-row .sr-label small { font-size: 11.5px; color: var(--muted); }
.setting-row .sr-input { flex: 1; max-width: 380px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  /* 顶部导航在窄屏下横向滚动，用户可左右滑动查看全部菜单 */
  .sidebar { padding: 0 14px; gap: 10px; }
  .side-brand small { display: none; }
  .side-user-info { display: none; }
  .side-user { padding-left: 10px; }
  .only-mobile { display: none; }
  .topbar { padding: 0 16px; height: 58px; top: 64px; }
  .view { padding: 18px 16px 40px; }
  .topbar-title h1 { font-size: 16px; }
  .topbar-title p { display: none; }
  .collect-pill { display: none; }
  .g-3 { grid-template-columns: 1fr; }
  .g-2 { grid-template-columns: 1fr; }
  .month-banner { flex-wrap: wrap; gap: 14px; }
  .mb-side { text-align: left; }
}
@media (max-width: 640px) {
  .g-4 { grid-template-columns: 1fr 1fr; }
  .kpi .num { font-size: 22px; }
  .mb-num { font-size: 26px !important; }
  .search-box input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 代码块 */
.code-block {
  background: #0B1739; color: #C7D7FF; border-radius: 10px; padding: 14px 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.8;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 10px 0 0;
}

/* 员工卡片：两行布局 */
.staff-card { padding: 16px 18px; }
.staff-top { display: flex; align-items: center; gap: 12px; }
.staff-top .avatar { width: 44px; height: 44px; border-radius: 13px; }
.staff-top .staff-name b { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.staff-top .staff-name small { color: var(--muted); font-size: 11.5px; display: block; margin-top: 2px; }
.staff-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed #EEF2F9; text-align: center;
}
.staff-grid b { display: block; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.staff-grid small { font-size: 10.5px; color: var(--muted); }

/* ---------------- 场景运营 ---------------- */
.scenario-card { padding: 18px 20px; cursor: pointer; transition: .16s; border: 1px solid transparent; }
.scenario-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,27,51,.09); border-color: #E3ECFC; }
.sc-top { display: flex; align-items: flex-start; gap: 10px; }
.sc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex: none; }
.sc-name { flex: 1; min-width: 0; }
.sc-name b { font-size: 15px; display: block; }
.sc-name small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-heat { font-size: 22px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.sc-rev { font-size: 22px; font-weight: 650; margin-top: 14px; font-variant-numeric: tabular-nums; }
.sc-rev .trend { font-size: 11.5px; margin-left: 4px; }
.sc-stats { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.sc-bar { height: 6px; border-radius: 6px; background: #EEF2F9; overflow: hidden; margin-top: 12px; }
.sc-bar i { display: block; height: 100%; border-radius: 6px; }
.sc-products { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; min-height: 22px; }
.sc-products .pill { font-size: 10.5px; padding: 2px 7px; }

.field small { display: block; margin-top: 4px; line-height: 1.5; }

/* ---------------- 预警中心 ---------------- */
.alert-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.alert-summary-item { background: #fff; border: 1px solid #E6ECF7; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: .15s; }
.alert-summary-item:hover { border-color: #BFD4FF; transform: translateY(-1px); }
.alert-summary-item.on { border-color: #1B6BFF; box-shadow: 0 0 0 3px rgba(27,107,255,.08); }
.alert-summary-item span { font-size: 12px; color: var(--muted); display: block; }
.alert-summary-item b { font-size: 26px; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.alert-summary-item small { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }

/* ---------------- 看板预警条 ---------------- */
.alert-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; border-radius: 12px; padding: 12px 16px; font-size: 12.5px; }
.alert-strip .as-bell { font-size: 16px; }
.alert-strip b.red { color: #DC2626; }
.alert-strip b.orange { color: #EA580C; }
.alert-strip b.cyan { color: #0891B2; }
.alert-strip b.green { color: #059669; }
.alert-strip b.purple { color: #7C3AED; }
.scenario-mini { background: #F8FAFF; border: 1px solid #EEF2F9; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: .15s; }
.scenario-mini:hover { border-color: #BFD4FF; transform: translateY(-1px); }

/* ==========================================================================
   2026-11-28 · 横版后台优化：浅蓝主题 + 宽屏居中 + 导航自适应
   ========================================================================== */
:root {
  --blue: #2F80ED;
  --blue-2: #4A9BFF;
  --blue-soft: #EAF4FF;
  --bg: #F1F7FF;
  --text: #14264A;
  --text-2: #3C567C;
  --muted: #6E86A8;
  --line: #E2ECFA;
  --shadow: 0 8px 24px rgba(46, 111, 214, .07);
}

body { background: var(--bg); }

/* 顶部导航：深色 → 浅蓝 */
.sidebar {
  background: linear-gradient(180deg, #EAF4FF 0%, #F7FBFF 100%);
  color: var(--text);
  border-bottom: 1px solid #DCEAFB;
  box-shadow: 0 4px 18px rgba(46, 111, 214, .06);
}
.side-brand { border-right-color: #D8E7F9; }
.side-brand b { color: #14264A; }
.side-brand small { color: #7891B4; }
.logo-mark {
  background: linear-gradient(135deg, #4A9BFF, #2F6FE0);
  box-shadow: 0 10px 26px rgba(46, 111, 214, .28);
}
.nav-item { color: #5B7397; }
.nav-item:hover { background: #E1EFFF; color: #1B64D8; }
.nav-item.active {
  background: linear-gradient(135deg, #D7E9FF, #EAF4FF);
  color: #1B64D8;
  box-shadow: 0 4px 12px rgba(46, 111, 214, .12);
}
.nav-item.active .ico { opacity: 1; }
.nav-sep { background: #D8E7F9; }
.nav-badge { background: #F97316; box-shadow: 0 2px 6px rgba(249, 115, 22, .25); }
.side-user { border-left-color: #D8E7F9; }
.side-user b { color: #14264A; }
.side-user small { color: #7891B4; }
.sidebar .icon-btn { color: #5B7397; }
.sidebar .icon-btn:hover { background: #E1EFFF; color: #1B64D8; }

/* 内容区：宽屏居中，和顶栏标题对齐 */
.topbar {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: #E2ECFA;
  padding-left: max(30px, calc((100vw - 1560px) / 2 + 30px));
  padding-right: max(30px, calc((100vw - 1560px) / 2 + 30px));
}
.view {
  max-width: 1560px;
  margin: 0 auto;
  padding: 26px 30px 50px;
}
.collect-pill { background: #EFF7FF; border-color: #DCEBFB; }
.card {
  border: 1px solid #E9F2FE;
  box-shadow: 0 6px 20px rgba(46, 111, 214, .05);
}
.btn.primary {
  background: linear-gradient(135deg, #4A9BFF, #2F80ED);
  box-shadow: 0 8px 18px rgba(47, 128, 237, .22);
}
.btn.primary:hover { filter: brightness(1.04); }
.btn:hover { border-color: #C9DDF7; background: #F8FBFF; }

/* 月份横幅：深藏青 → 浅蓝 */
.month-banner {
  background: linear-gradient(120deg, #E9F4FF 0%, #D9EBFF 55%, #C9E2FF 100%);
  color: #123B75;
  border: 1px solid #D3E7FF;
}
.month-banner::after {
  background: radial-gradient(circle, rgba(47, 128, 237, .14), transparent 65%);
}
.mb-bar { background: rgba(20, 66, 126, .12); }
.mb-bar i { background: linear-gradient(90deg, #7EB0FF, #2F80ED); }
.mb-meta, .month-banner .mb-label { opacity: .75; }
.month-banner .mb-num small { opacity: .65; }

/* 登录页：亮蓝左边 + 浅蓝右边 */
.login-wrap { background: #F3F9FF; }
.login-brand {
  background: radial-gradient(120% 120% at 0% 0%, #65AEFF 0%, #3B8BF0 55%, #2A6FDB 100%);
}
.login-form-side { background: #F8FBFF; }

/* 中等宽度：收紧导航，避免 1366 被截断 */
@media (max-width: 1500px) {
  .sidebar { padding: 0 16px; gap: 10px; }
  .side-brand { padding-right: 12px; }
  .nav-item { padding: 8px 9px; font-size: 12.5px; gap: 5px; }
  .side-user { padding-left: 12px; }
}
@media (max-width: 1240px) {
  .side-brand small { display: none; }
  .side-user-info { display: none; }
  .nav-item { padding: 7px 7px; font-size: 12px; gap: 4px; }
}
@media (max-width: 980px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
    top: 64px;
  }
  .view { padding: 18px 16px 40px; }
}
.sc-icon { box-shadow: 0 4px 10px rgba(46, 111, 214, .16); }
.month-banner .mb-meta { opacity: .9; }
.month-banner .mb-label { opacity: .8; }
.mix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mix-title { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.mix-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; }
.mix-row b { width: 46px; flex: none; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mix-bar { flex: 1; height: 6px; background: #EDF4FD; border-radius: 6px; overflow: hidden; }
.mix-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #7EB0FF, #2F80ED); }
.mix-row em { width: 20px; text-align: right; font-style: normal; color: var(--muted); }
@media (max-width: 980px) {
  .alert-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mix-grid { grid-template-columns: 1fr; }
}
