* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #F3F5F7; color: #1F2937; padding: 20px 24px 32px; }
h1 { font-size: 20px; margin-bottom: 2px; }
.sub { color: #6B7280; font-size: 12px; margin-bottom: 16px; }

/* 顶部导航 */
.nav { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.nav .brand { font-weight: 700; font-size: 15px; margin-right: 12px; color: #4E2CFF; }
.nav a { padding: 7px 14px; border-radius: 8px; text-decoration: none; color: #374151; font-size: 14px; background: #fff; border: 1px solid #E5E7EB; }
.nav a.active { background: #4E2CFF; color: #fff; border-color: #4E2CFF; }
.nav .spacer { flex: 1; }
.nav button { padding: 7px 16px; background: #4E2CFF; color: #fff; border: 0; border-radius: 8px; font-size: 13px; cursor: pointer; }

/* 登录门 */
.gate { max-width: 380px; margin: 80px auto; background: #fff; border-radius: 12px; padding: 32px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.gate h2 { font-size: 16px; margin-bottom: 12px; }
.gate input { width: 100%; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.gate button { padding: 10px 18px; background: #4E2CFF; color: #fff; border: 0; border-radius: 8px; font-size: 14px; cursor: pointer; }
.gate .err { color: #DC2626; font-size: 12px; margin-top: 8px; min-height: 16px; }

/* 卡片与面板 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card .num { font-size: 24px; font-weight: 700; color: #4E2CFF; }
.card .label { font-size: 12px; color: #6B7280; margin-top: 3px; }
.group-title { font-size: 13px; color: #374151; font-weight: 600; margin: 2px 0 10px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 18px; }
.panel { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); margin-bottom: 16px; }
.panel h3 { font-size: 14px; margin-bottom: 10px; }

/* 表格 */
table.list { width: 100%; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); border-collapse: collapse; font-size: 13px; overflow: hidden; }
table.list th, table.list td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #F3F4F6; white-space: nowrap; }
table.list th { background: #F9FAFB; font-size: 12px; color: #6B7280; }
.dist { width: 100%; border-collapse: collapse; font-size: 13px; }
.dist td { padding: 4px 0; border-bottom: 1px solid #F3F4F6; }
.dist td:last-child { text-align: right; font-weight: 600; }
.empty { text-align: center; color: #9CA3AF; padding: 28px 0; }

/* 趋势条形图 */
.chart { display: flex; align-items: flex-end; gap: 5px; height: 110px; padding: 8px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.chart .bar { background: #4E2CFF; border-radius: 3px 3px 0 0; min-height: 2px; }
.chart .bar.alt { background: #22C1DC; }
.chart .bar.alt2 { background: #F59E0B; }
.chart-labels { display: flex; gap: 5px; margin-top: 4px; }
.chart-labels span { flex: 1; text-align: center; font-size: 10px; color: #9CA3AF; }
.legend { display: flex; gap: 14px; font-size: 12px; color: #6B7280; margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* 漏斗 */
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.funnel-row .name { width: 84px; color: #374151; }
.funnel-row .track { flex: 1; background: #F3F4F6; border-radius: 6px; height: 22px; position: relative; }
.funnel-row .fill { height: 100%; background: #4E2CFF; border-radius: 6px; min-width: 2px; }
.funnel-row .val { position: absolute; left: 8px; top: 2px; color: #fff; font-size: 12px; font-weight: 600; }
.funnel-row .rate { width: 46px; text-align: right; color: #6B7280; font-size: 12px; }

/* 用户表工具行 */
.tools { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tools input, .tools select { padding: 8px 10px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 13px; }
.tools button { padding: 8px 16px; background: #4E2CFF; color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-size: 13px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 4px; font-size: 13px; color: #6B7280; }
.pager button { padding: 6px 12px; background: #fff; color: #374151; border: 1px solid #D1D5DB; border-radius: 6px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

/* 状态徽章与操作 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge.uncontacted { background: #F3F4F6; color: #6B7280; }
.badge.contacted { background: #DBEAFE; color: #1D4ED8; }
.badge.converted { background: #D1FAE5; color: #047857; }
.badge.rejected { background: #FEE2E2; color: #B91C1C; }
.op { padding: 3px 10px; margin-right: 4px; border: 1px solid #D1D5DB; background: #fff; border-radius: 5px; cursor: pointer; font-size: 12px; }
.op.danger { color: #DC2626; border-color: #FECACA; }
.exam-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.exam-form input, .exam-form select { padding: 8px 10px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 13px; }
.exam-form button { padding: 8px 16px; background: #4E2CFF; color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-size: 13px; }
.muted { color: #9CA3AF; font-size: 12px; }
.warn { color: #B45309; font-size: 12px; margin-top: 6px; }
.note-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.phone { font-weight: 600; letter-spacing: .3px; }
.detail-box { margin: 12px 16px 16px; padding: 12px; background: #F9FAFB; border-radius: 8px; }
