* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body {
  font-family: "Microsoft YaHei","PingFang SC",sans-serif; background:#f0f2f5;
  color:#333; font-size:14px; max-width:640px; margin:0 auto; min-height:100vh;
}
.hidden { display:none !important; }

/* ============ 登录 ============ */
.login-page {
  min-height:100vh; background:linear-gradient(160deg,#1e3a8a 0%,#2563eb 55%,#3b82f6 100%);
  padding:0 26px;
}
.login-head { text-align:center; color:#fff; padding:80px 0 40px; }
.login-logo {
  width:70px;height:70px;margin:0 auto 16px;border-radius:18px;
  background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.35);
  display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:bold;
}
.login-head h2 { font-size:22px; margin-bottom:6px; }
.login-head p { font-size:13px; opacity:.8; }
.login-form {
  background:#fff; border-radius:16px; padding:24px 20px;
  box-shadow:0 12px 30px rgba(0,0,0,.2);
}
.m-field { margin-bottom:16px; }
.m-field label { display:block; font-size:13px; color:#6b7280; margin-bottom:6px; }
.m-field input, .m-field select, .m-field textarea {
  width:100%; padding:11px 12px; border:1px solid #d1d5db; border-radius:10px;
  font-size:15px; outline:none; background:#fff;
}
.m-field input:focus, .m-field select:focus, .m-field textarea:focus { border-color:#2563eb; }
.m-field textarea { resize:none; }
.login-err { color:#dc2626; font-size:13px; margin-bottom:10px; }
.m-btn-primary {
  background:#2563eb; color:#fff; border:none; border-radius:10px;
  padding:12px; font-size:15px; cursor:pointer; width:100%;
}
.btn-block { margin-top:6px; }

/* ============ 主框架 ============ */
.app { padding-bottom:64px; }
main { min-height:100vh; }
.tabbar {
  position:fixed; bottom:0; left:50%; transform:translateX(-50%);
  width:100%; max-width:640px; height:58px; background:#fff;
  display:flex; box-shadow:0 -2px 10px rgba(0,0,0,.06); z-index:20;
}
.tab {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px; font-size:11px; color:#9ca3af; cursor:pointer;
}
.tab-ico { font-size:20px; }
.tab.active { color:#2563eb; font-weight:bold; }

/* ============ 顶部 ============ */
.m-head {
  background:linear-gradient(135deg,#1e3a8a,#2563eb); color:#fff;
  padding:22px 18px 54px; position:relative;
}
.m-head .hi { font-size:17px; font-weight:bold; }
.m-head .sub { font-size:12px; opacity:.8; margin-top:4px; }
.m-head .logout {
  position:absolute; top:16px; right:16px; background:rgba(255,255,255,.2);
  border:none; color:#fff; padding:5px 12px; border-radius:14px; font-size:12px;
}
.stat-float {
  display:grid; grid-template-columns:repeat(4,1fr); gap:8px;
  margin:-38px 14px 0; position:relative; z-index:2;
  background:#fff; border-radius:14px; padding:14px 6px;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.sf-item { text-align:center; }
.sf-val { font-size:19px; font-weight:bold; color:#2563eb; }
.sf-label { font-size:11px; color:#9ca3af; margin-top:3px; }

/* ============ 通用区块 ============ */
.section { margin:14px 14px 0; }
.sec-title { font-size:15px; font-weight:bold; color:#1f2937; margin-bottom:10px; display:flex; justify-content:space-between; align-items:center; }
.quick-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.q-item {
  background:#fff; border-radius:12px; padding:14px 4px; text-align:center;
  box-shadow:0 1px 3px rgba(0,0,0,.05); cursor:pointer;
}
.q-ico { font-size:22px; }
.q-name { font-size:12px; color:#4b5563; margin-top:5px; }

.card { background:#fff; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,.05); margin-bottom:10px; }

/* 搜索与筛选 */
.search-row { margin:14px 14px 0; display:flex; gap:8px; }
.search-row input {
  flex:1; padding:10px 14px; border:1px solid #e5e7eb; border-radius:20px;
  font-size:14px; outline:none; background:#fff;
}
.chip-row { display:flex; gap:8px; padding:10px 14px 0; overflow-x:auto; }
.chip {
  flex-shrink:0; padding:6px 14px; border-radius:16px; font-size:12px;
  background:#fff; color:#6b7280; border:1px solid #e5e7eb; cursor:pointer;
}
.chip.active { background:#2563eb; color:#fff; border-color:#2563eb; }

/* 客户卡片 */
.c-card { padding:14px; }
.c-head { display:flex; align-items:center; gap:10px; }
.c-avatar {
  width:40px;height:40px;border-radius:10px;background:#dbeafe;color:#2563eb;
  display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:bold;flex-shrink:0;
}
.c-info { flex:1; min-width:0; }
.c-name { font-size:15px; font-weight:bold; color:#1f2937; }
.c-meta { font-size:12px; color:#9ca3af; margin-top:3px; }
.c-need { font-size:13px; color:#d97706; font-weight:bold; flex-shrink:0; }
.c-tags { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.tag {
  font-size:11px; padding:3px 8px; border-radius:6px;
  background:#f3f4f6; color:#6b7280;
}
.tag.b { background:#eff6ff; color:#2563eb; }

/* 订单卡片 */
.o-card { padding:14px; }
.o-top { display:flex; justify-content:space-between; align-items:center; }
.o-no { font-size:12px; color:#9ca3af; font-family:monospace; }
.o-name { font-size:15px; font-weight:bold; margin-top:6px; }
.o-row { display:flex; gap:14px; margin-top:8px; font-size:13px; color:#6b7280; flex-wrap:wrap; }
.o-row b { color:#2563eb; }
.o-prod { font-size:13px; color:#374151; margin-top:4px; }

.badge { display:inline-block; padding:3px 10px; border-radius:12px; font-size:11px; }
.b-gray{background:#f3f4f6;color:#6b7280;} .b-blue{background:#dbeafe;color:#1d4ed8;}
.b-green{background:#d1fae5;color:#047857;} .b-orange{background:#fef3c7;color:#b45309;}
.b-red{background:#fee2e2;color:#b91c1c;} .b-purple{background:#ede9fe;color:#6d28d9;}

/* 跟进条目 */
.fu-item { background:#fff; border-radius:12px; padding:12px 14px; margin-bottom:8px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.fu-head { display:flex; gap:8px; align-items:center; font-size:11px; color:#9ca3af; margin-bottom:5px; }
.fu-content { font-size:13px; line-height:1.6; color:#374151; }

.empty-tip { text-align:center; color:#9ca3af; padding:46px 0; font-size:13px; }

/* 悬浮添加按钮 */
.fab {
  position:fixed; right:18px; bottom:74px; width:52px; height:52px; border-radius:50%;
  background:#2563eb; color:#fff; border:none; font-size:26px;
  box-shadow:0 8px 20px rgba(37,99,235,.4); z-index:15; cursor:pointer;
}

/* ============ 底部抽屉表单 ============ */
.sheet-mask {
  position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:30;
  display:flex; align-items:flex-end; justify-content:center;
}
.sheet {
  background:#f8f9fb; width:100%; max-width:640px; max-height:88vh; overflow:auto;
  border-radius:18px 18px 0 0; padding:18px 18px 30px;
  animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform:translateY(40px); opacity:.4; } to { transform:none; opacity:1; } }
.sheet-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.sheet-title { font-size:16px; font-weight:bold; color:#1f2937; }
.sheet-close { background:none; border:none; font-size:20px; color:#9ca3af; cursor:pointer; }
.sheet-foot { display:flex; gap:10px; margin-top:16px; }
.sheet-foot .m-btn-primary { flex:1; }
.btn-plain { background:#e5e7eb; color:#4b5563; }

/* ============ 我的页 ============ */
.mine-card { background:#fff; border-radius:14px; margin:14px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.mine-user { display:flex; align-items:center; gap:14px; padding:20px 16px; }
.mine-avatar {
  width:54px;height:54px;border-radius:50%;background:linear-gradient(135deg,#2563eb,#3b82f6);
  color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;
}
.mine-name { font-size:17px; font-weight:bold; }
.mine-role { font-size:12px; color:#9ca3af; margin-top:4px; }
.mine-list { border-top:1px solid #f3f4f6; }
.mine-item {
  display:flex; align-items:center; gap:10px; padding:15px 16px;
  font-size:14px; color:#374151; border-bottom:1px solid #f9fafb; cursor:pointer;
}
.mine-item:last-child { border-bottom:none; }
.mine-item .arr { margin-left:auto; color:#d1d5db; }
.mine-item.danger { color:#dc2626; }
.about-tip { text-align:center; color:#c0c4cc; font-size:12px; padding:24px 0 10px; }

/* 客户详情 */
.detail-sec { background:#fff; border-radius:12px; padding:14px; margin-bottom:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.detail-sec h4 { font-size:14px; color:#1f2937; margin-bottom:10px; padding-left:8px; border-left:3px solid #2563eb; }
.dl { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.dl div { font-size:13px; color:#6b7280; }
.dl b { color:#1f2937; font-weight:normal; }
.detail-actions { display:flex; gap:10px; margin:4px 0 14px; }
.detail-actions button {
  flex:1; padding:11px; border:none; border-radius:10px; font-size:14px; cursor:pointer;
}
.nav-btn { background:#64748b; }
.m-btn-primary[disabled] { opacity:.4; }
