/* ==========================================================================
   扫街CRM · 统一视觉样式（手机 H5 + PC 后台）
   ========================================================================== */
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e7ebf1;
  --line-2: #eef2f7;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --success: #059669;
  --success-soft: #ecfdf5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -18px rgba(15, 23, 42, .28);
  --sidebar: 224px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
p { margin: 0; }
input, select, textarea, button { font-family: inherit; font-size: 14px; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 600; }
.nums { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-primary { color: var(--primary); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .16s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: #cbd5e1; color: var(--text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fee2e2; color: var(--danger); }
.btn-soft { background: var(--primary-soft); border-color: #dbeafe; color: var(--primary); }
.btn-soft:hover { background: #dbeafe; color: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef2f7; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 20px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: #f1f5f9; color: var(--muted); border: 1px solid transparent;
  white-space: nowrap; line-height: 1.6;
}
.st-new { background: #eff6ff; color: #1d4ed8; }
.st-quoted { background: #f5f3ff; color: #6d28d9; }
.st-wait { background: #fff7ed; color: #c2410c; }
.st-follow { background: #ecfeff; color: #0e7490; }
.st-deal { background: #ecfdf5; color: #047857; }
.st-drop { background: #f1f5f9; color: #64748b; }
.pay-none { background: var(--danger-soft); color: var(--danger); }
.pay-part { background: var(--warn-soft); color: var(--warn); }
.pay-full { background: var(--success-soft); color: var(--success); }

/* 回款进度条与流水 */
.pay-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin: 12px 0 8px; }
.pay-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #60a5fa, #2563eb); transition: width .35s ease; }
.pay-bar.done > i { background: linear-gradient(90deg, #34d399, #059669); }
.pay-list { margin: 0; }
.pay-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pay-item:last-child { border-bottom: 0; padding-bottom: 0; }
.pay-item:first-child { padding-top: 0; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.tag-due { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.tag-ok { background: var(--success-soft); color: var(--success); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-blue { background: var(--primary-soft); color: var(--primary); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label, .field-label {
  display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 7px;
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; }
.input, .select, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid #d8dee8; border-radius: 10px;
  background: #fff; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input:disabled { background: #f8fafc; color: var(--muted); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.6; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix .unit { color: var(--muted-2); font-size: 13px; white-space: nowrap; }

.check-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid #dbe2ec; border-radius: 999px; background: #fff; cursor: pointer;
  font-size: 13px; color: var(--text-2); user-select: none; transition: all .15s;
  white-space: nowrap; flex: 0 0 auto;
}
.check-chip input { display: none; }
.check-chip.on, .check-chip:has(input:checked) {
  background: var(--primary-soft); border-color: #bfdbfe; color: var(--primary-dark); font-weight: 500;
}
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   手机 H5
   ========================================================================== */
body.h5 { background: #f4f6f9; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
/* 只有带悬浮「新增客户」按钮的页面才需要额外底部留白，避免遮住最后一条 */
body.h5.has-fab { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

.h5-header {
  position: -webkit-sticky;
  position: sticky; top: 0; z-index: 30;
  padding: 12px 16px 11px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 8px 20px -14px rgba(30, 64, 175, .9);
}
.h5-header.plain { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); box-shadow: none; }

/* 品牌行：哈士奇头像 + 小厨神 */
.h5-header .brand-row { display: flex; align-items: center; gap: 9px; min-height: 32px; }
.husky-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden;
  background: #fff; box-shadow: 0 4px 12px -5px rgba(15, 23, 42, .55), inset 0 0 0 1.5px rgba(255, 255, 255, .9);
}
.husky-avatar svg { width: 100%; height: 100%; display: block; }
.brand-husky-lg { width: 46px; height: 46px; }
.brand-husky-sm { width: 30px; height: 30px; }
.h5-header .brand-word { font-size: 15px; font-weight: 700; letter-spacing: .6px; flex: none; }
.h5-header .brand-sub { font-size: 11px; opacity: .68; flex: 1; min-width: 0; padding-top: 2px; }
.h5-header.plain .brand-word { color: var(--text); }
.h5-header.plain .brand-sub { color: var(--muted); opacity: 1; }

/* 类目行：客户 / 业绩 / 地图 / 日志 / 我的 */
.h5-header .cat-row { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.h5-header .cat-row a {
  flex: 1; min-width: 0; text-align: center; text-decoration: none; white-space: nowrap;
  padding: 6px 4px; border-radius: 9px; font-size: 15px; font-weight: 500; line-height: 1.2;
  color: rgba(255, 255, 255, .76); transition: background .15s, color .15s;
}
.h5-header .cat-row a.active { color: #fff; font-weight: 700; background: rgba(255, 255, 255, .2); }
.h5-header .cat-row .cat-dot {
  display: inline-block; width: 14px; height: 14px; min-width: 14px; padding: 0 4px; margin-left: 2px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; line-height: 14px;
  text-align: center; font-style: normal; font-weight: 600; transform: translateY(-6px);
}
.h5-header.plain .cat-row a { color: var(--muted); }
.h5-header.plain .cat-row a.active { color: var(--primary); background: var(--primary-soft); }

/* 子页面标题 / 返回行 */
.h5-header .page-row { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 15px; font-weight: 600; min-width: 0; }

.h5-header .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h5-header h1 { font-size: 18px; font-weight: 600; letter-spacing: .2px; }
.h5-header .sub { font-size: 12px; opacity: .85; margin-top: 3px; }
.h5-header.plain .sub { color: var(--muted); opacity: 1; }
.h5-header .head-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.h5-header .head-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 11px; border-radius: 9px; font-size: 13px;
  background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
}
.h5-header.plain .head-btn { background: #f1f5f9; color: var(--text-2); border-color: var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-size: 15px; opacity: .95; }

.h5-main { padding: 14px 14px 20px; max-width: 680px; margin: 0 auto; }
body.h5.wide .h5-main { max-width: 900px; }

.searchbar {
  display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 11px; padding: 8px 12px; margin-top: 12px;
}
.searchbar input {
  flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 14px;
}
.searchbar input::placeholder { color: rgba(255, 255, 255, .72); }
.searchbar svg { flex: none; opacity: .85; }

.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.quick-stat {
  background: #fff; border-radius: 12px; padding: 12px 10px; text-align: center; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-2);
}
.quick-stat .num { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.quick-stat .lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }
.quick-stat.alert .num { color: var(--danger); }

.due-banner {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6); border: 1px solid #fecdd3;
  color: #9f1239; margin-bottom: 14px; font-size: 13px;
}
.due-banner strong { font-size: 15px; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 10px; font-size: 13px; font-weight: 600; color: var(--text-2);
}
.section-title .count { color: var(--muted-2); font-weight: 400; font-size: 12px; }

.cust-card {
  position: relative; display: block; background: #fff; border-radius: 13px; padding: 13px 14px 12px 16px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.cust-card:active { transform: scale(.995); }
.cust-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: #e2e8f0;
}
.cust-card.due { background: linear-gradient(180deg, #fff7f7, #fff); border-color: #fecdd3; box-shadow: 0 2px 10px -4px rgba(220, 38, 38, .25); }
.cust-card.due::before { background: var(--danger); }
.cust-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cust-card .name { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.cust-card .meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cust-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 8px; }
.cust-card .amount { font-size: 14px; font-weight: 600; color: var(--text); }
.cust-card .due-tip { color: var(--danger); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }

.empty {
  text-align: center; padding: 48px 20px; color: var(--muted-2); font-size: 13px;
}
.empty .icon { font-size: 34px; margin-bottom: 10px; opacity: .5; }

.fab {
  position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 41;
  display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 18px 0 15px;
  border-radius: 999px; background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .85); border: none;
}
.fab svg { width: 20px; height: 20px; }

.card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 12px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h3 { font-size: 14px; }
.card-head .desc { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }

.kv-list { display: grid; gap: 0; }
.kv {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px;
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); flex: none; min-width: 74px; }
.kv .v { color: var(--text); text-align: right; word-break: break-all; }
.kv .v.left { text-align: left; }

.money-big { font-size: 26px; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }

.due-box { background: linear-gradient(135deg, #fff1f2, #fff); border: 1px solid #fecdd3; border-radius: 12px; padding: 13px 14px; }
.due-box .title { color: #9f1239; font-weight: 600; font-size: 14px; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -16px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: #fff; border: 2px solid var(--primary);
}
.tl-item .tl-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tl-item .tl-body { font-size: 13px; color: var(--text-2); margin-top: 4px; white-space: pre-wrap; word-break: break-word; }

.hw-row {
  display: grid; grid-template-columns: 1fr 92px 60px 34px; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed var(--line-2);
}
.hw-row:last-child { border-bottom: none; }
.hw-row .name { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hw-row input[type="number"] { padding: 7px 8px; text-align: right; }

.quote-sum {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 12px 14px; border-radius: 11px; background: var(--primary-soft);
  border: 1px solid #dbeafe; color: var(--primary-dark); font-weight: 600;
}

.flash-wrap { margin-bottom: 12px; }
.flash {
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 8px;
  border: 1px solid transparent;
}
.flash.success { background: var(--success-soft); color: #065f46; border-color: #a7f3d0; }
.flash.error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.flash.info { background: var(--primary-soft); color: #1e40af; border-color: #bfdbfe; }

.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.form-actions .btn { flex: 1; }

.map-wrap { height: calc(100vh - 220px); min-height: 360px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #eef2f7; }
.map-tip { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.7; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600;
}
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }

/* ==========================================================================
   PC 管理后台
   ========================================================================== */
body.admin { display: flex; min-height: 100vh; background: #f6f8fb; }

.sidebar {
  width: var(--sidebar); flex: none; background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px;
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .3px;
}
.sidebar .brand .logo {
  height: 30px; min-width: 30px; padding: 0 8px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; letter-spacing: .3px; flex: none;
}
.sidebar .brand .brand-husky { width: 32px; height: 32px; }
.sidebar .brand .brand-word { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.sidebar .brand small { display: block; font-size: 11px; font-weight: 400; color: #7c8ba1; margin-top: 1px; }
.side-group { padding: 8px 10px 2px; font-size: 10.5px; color: #64748b; letter-spacing: .8px; padding-left: 20px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: #cbd5e1; font-size: 13.5px; text-decoration: none; transition: background .15s, color .15s;
}
.side-nav a:hover { background: rgba(148, 163, 184, .12); color: #fff; }
.side-nav a.active { background: var(--primary); color: #fff; font-weight: 500; box-shadow: 0 6px 16px -10px rgba(37, 99, 235, .9); }
.side-nav a svg { width: 17px; height: 17px; opacity: .9; }
.side-nav a .count {
  margin-left: auto; background: rgba(239, 68, 68, .9); color: #fff; font-size: 10px;
  padding: 1px 6px; border-radius: 999px; font-weight: 600;
}
.sidebar .side-foot { margin-top: auto; padding: 14px 18px; font-size: 11px; color: #64748b; border-top: 1px solid rgba(148, 163, 184, .12); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 26px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; font-weight: 600; }
.topbar .crumbs { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

.page { padding: 20px 26px 40px; }
.page-narrow { max-width: 1080px; }

.main-foot {
  margin-top: auto; padding: 15px 26px 17px;
  text-align: center; font-size: 11.5px; letter-spacing: .3px; color: #94a3b8;
  border-top: 1px solid var(--line-2);
}
.main-foot .sep { margin: 0 6px; color: #cbd5e1; }
.main-foot a { color: #94a3b8; transition: color .15s; }
.main-foot a:hover { color: var(--primary); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: #fff; border-radius: 13px; padding: 16px 18px; border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi .lbl { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 25px; font-weight: 650; margin-top: 6px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.kpi.accent { background: linear-gradient(135deg, #1e40af, #2563eb); border-color: transparent; color: #fff; }
.kpi.accent .lbl, .kpi.accent .sub { color: rgba(255, 255, 255, .8); }
.kpi.alert .val { color: var(--danger); }
.kpi.warn .val { color: var(--warn); }

.panel {
  background: #fff; border-radius: 13px; border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  margin-bottom: 18px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.panel-head h2 { font-size: 14.5px; font-weight: 600; }
.panel-head .hint { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--line-2);
}
.filter-bar .input, .filter-bar .select { width: auto; min-width: 140px; padding: 8px 11px; font-size: 13px; }
.filter-bar .select { padding-right: 32px; }
.filter-bar .grow { flex: 1; min-width: 160px; }

.table-wrap { overflow-x: auto; }
.table { font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; color: var(--muted); background: #f9fbfd;
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fbfdff; }
.table tbody tr:last-child td { border-bottom: none; }
.table tr.row-due { background: #fff7f7; }
.table tr.row-due:hover { background: #fff1f2; }
.table .strong { font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions-cell { white-space: nowrap; text-align: right; }
.table tfoot td { background: #f9fbfd; font-weight: 600; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; font-size: 13px; }
.pagination a, .pagination span {
  padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); color: var(--text-2);
}
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

.empty-state { padding: 46px 20px; text-align: center; color: var(--muted-2); font-size: 13px; }
.empty-state .icon { font-size: 30px; opacity: .45; margin-bottom: 8px; }

.detail-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .detail-grid { grid-template-columns: 1fr; } }

.money-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--line-2); }
.money-row:last-child { border-bottom: none; }
.money-row .k { color: var(--muted); }
.money-row.total { font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); border-bottom: none; margin-top: 4px; padding-top: 12px; }
.money-row.highlight { background: var(--primary-soft); margin: 8px -10px 0; padding: 10px; border-radius: 9px; border: none; }

.commission-box { background: linear-gradient(135deg, #f8fafc, #eff6ff); border: 1px solid #dbeafe; border-radius: 12px; padding: 16px; }
.commission-box .amount-now { font-size: 24px; font-weight: 650; color: var(--primary-dark); }

.alert {
  padding: 11px 14px; border-radius: 10px; font-size: 13px; border: 1px solid transparent; margin-bottom: 14px;
  display: flex; gap: 9px; align-items: flex-start;
}
.alert.warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.alert.info { background: var(--primary-soft); border-color: #bfdbfe; color: #1e40af; }
.alert.danger { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }
.alert.success { background: var(--success-soft); border-color: #a7f3d0; color: #065f46; }

.seg { display: inline-flex; background: #f1f5f9; border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.seg a.on { background: #fff; color: var(--text); font-weight: 500; box-shadow: var(--shadow-sm); }

/* ==========================================================================
   登录页
   ========================================================================== */
body.guest {
  min-height: 100vh; padding: 32px 20px;
  display: flex; align-items: center; justify-content: center;
  background: #060a13; position: relative; overflow-x: hidden;
  color: var(--text);
}
/* 背景光晕 */
body.guest::before {
  content: ""; position: fixed; inset: -25% -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 16%, rgba(37, 99, 235, .52), transparent 68%),
    radial-gradient(34% 38% at 84% 80%, rgba(6, 182, 212, .26), transparent 68%),
    radial-gradient(30% 34% at 68% 4%, rgba(129, 140, 248, .24), transparent 70%);
  filter: blur(28px);
  animation: guestGlow 22s ease-in-out infinite alternate;
}
@keyframes guestGlow {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.12); }
}
/* 背景网格 */
body.guest::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .075) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 76% 68% at 50% 46%, #000 8%, transparent 76%);
  mask-image: radial-gradient(ellipse 76% 68% at 50% 46%, #000 8%, transparent 76%);
}

.auth-shell {
  position: relative; z-index: 2;
  width: 100%; max-width: 1010px;
  display: grid; grid-template-columns: 1.06fr .94fr;
  border-radius: 26px; overflow: hidden; background: #0b1222;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 50px 110px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .04),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: authRise .72s cubic-bezier(.22, .9, .3, 1) both;
}
@keyframes authRise {
  from { opacity: 0; transform: translateY(24px) scale(.986); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 左侧品牌区 ---------- */
.auth-brand {
  position: relative; overflow: hidden;
  padding: 44px 42px 34px;
  display: flex; flex-direction: column; gap: 28px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(37, 99, 235, .32), transparent 62%),
    linear-gradient(155deg, #101c38 0%, #0b1426 52%, #080e1b 100%);
}
.auth-brand::after {
  content: ""; position: absolute; z-index: 1; right: -170px; bottom: -200px;
  width: 480px; height: 480px; pointer-events: none;
  background: radial-gradient(circle, rgba(6, 182, 212, .22), transparent 62%);
}
.auth-brand > * { position: relative; z-index: 2; }

.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  height: 44px; min-width: 44px; padding: 0 11px; flex: none; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; letter-spacing: .5px; color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8 72%);
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark.sm {
  height: 34px; min-width: 34px; padding: 0 8px; border-radius: 10px;
  font-size: 12px; letter-spacing: .4px;
}
.brand-name strong { display: block; font-size: 16px; letter-spacing: .3px; }
.brand-name span { display: block; margin-top: 3px; font-size: 9.5px; letter-spacing: 2.2px; color: rgba(255, 255, 255, .40); }

.brand-copy { margin-top: 6px; }
.brand-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 16px; font-size: 11px; letter-spacing: 1.6px; color: #93c5fd;
}
.brand-eyebrow::before {
  content: ""; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, #60a5fa);
}
.auth-brand h1 {
  font-size: 34px; line-height: 1.28; font-weight: 600; letter-spacing: -.6px; color: #fff;
}
.auth-brand h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #38bdf8, #818cf8 52%, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-desc { margin-top: 16px; font-size: 13px; line-height: 1.95; color: rgba(226, 232, 240, .70); }

.brand-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.brand-points li { display: flex; align-items: flex-start; gap: 12px; }
.pt-ico {
  width: 32px; height: 32px; flex: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #93c5fd; background: rgba(59, 130, 246, .14); border: 1px solid rgba(96, 165, 250, .24);
}
.brand-points b { display: block; font-size: 13px; font-weight: 600; letter-spacing: .2px; color: rgba(255, 255, 255, .94); }
.brand-points small { display: block; margin-top: 2px; font-size: 11.5px; color: rgba(148, 163, 184, .92); }

.brand-foot {
  margin-top: auto; padding-top: 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: rgba(148, 163, 184, .82);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .16);
  animation: dotPulse 2.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, .16); }
  50%      { box-shadow: 0 0 0 6px rgba(74, 222, 128, .04); }
}

/* ---------- 右侧表单区 ---------- */
.auth-panel {
  background: #fff; padding: 46px 44px 28px;
  display: flex; flex-direction: column;
}
.auth-mini { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-mini strong { font-size: 14px; color: #0f172a; }

.auth-eyebrow { margin-bottom: 10px; font-size: 10px; font-weight: 600; letter-spacing: 2.6px; color: #94a3b8; }
.auth-head { margin-top: auto; }
.auth-head h2 { font-size: 25px; font-weight: 650; letter-spacing: -.4px; color: #0f172a; }
.auth-sub { margin-top: 7px; font-size: 13px; color: #64748b; }

.auth-alert {
  display: flex; align-items: center; gap: 9px;
  margin-top: 18px; padding: 11px 13px; border-radius: 11px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 12.5px;
  animation: alertIn .28s ease both;
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.auth-form { margin-top: 24px; display: flex; flex-direction: column; }
.auth-field { margin-bottom: 16px; }
.auth-field > label {
  display: block; margin-bottom: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .2px; color: #475569;
}
.auth-control { position: relative; }
.auth-control input {
  width: 100%; height: 50px; padding: 0 48px 0 46px;
  border: 1px solid #e3e9f2; border-radius: 12px;
  background: #f8fafc; color: #0f172a; font-size: 14px; outline: none;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.auth-control input::placeholder { color: #a8b3c4; }
.auth-control input:hover { border-color: #cfd9e6; }
.auth-control input:focus {
  background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}
.ctl-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  display: flex; color: #9aa7ba; pointer-events: none; transition: color .18s;
}
.auth-control:focus-within .ctl-ico { color: var(--primary); }

.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: #9aa7ba; cursor: pointer; transition: background .16s, color .16s;
}
.pw-toggle:hover { background: #eef2f7; color: #475569; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.on .eye-open { display: none; }
.pw-toggle.on .eye-off { display: block; }

.auth-remember {
  display: flex; align-items: center; gap: 9px; margin-top: 2px;
  font-size: 12.5px; color: #64748b; cursor: pointer; user-select: none;
}
.auth-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-remember .box {
  width: 18px; height: 18px; flex: none; border-radius: 6px;
  border: 1.5px solid #cfd9e6; background: #fff; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
.auth-remember .box svg { opacity: 0; transform: scale(.6); transition: opacity .16s, transform .16s; }
.auth-remember input:checked + .box {
  background: linear-gradient(145deg, #3b82f6, #2563eb); border-color: #2563eb;
  box-shadow: 0 4px 10px -4px rgba(37, 99, 235, .85);
}
.auth-remember input:checked + .box svg { opacity: 1; transform: none; }
.auth-remember input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }

.auth-submit {
  position: relative; overflow: hidden; width: 100%; height: 50px; margin-top: 22px;
  border: 0; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 15px; font-weight: 600; letter-spacing: 1px; color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8 62%, #1e40af);
  box-shadow: 0 14px 28px -14px rgba(37, 99, 235, .95), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .16s, box-shadow .16s;
}
.auth-submit::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .30), transparent);
  transform: skewX(-18deg); transition: left .55s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(37, 99, 235, 1), inset 0 1px 0 rgba(255, 255, 255, .25); }
.auth-submit:hover::before { left: 122%; }
.auth-submit:active { transform: translateY(0) scale(.995); }
.auth-submit svg { opacity: .92; transition: transform .18s; }
.auth-submit:hover svg { transform: translateX(3px); }

.auth-hint {
  margin-top: 18px; font-size: 12px; color: #94a3b8; text-align: center;
}

.auth-foot {
  margin-top: auto; padding-top: 26px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 11px; color: #a8b3c4;
}
.auth-foot .sep { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }

@media (max-height: 780px) and (min-width: 901px) {
  .auth-brand { padding: 34px 36px 26px; gap: 22px; }
  .auth-brand h1 { font-size: 30px; }
  .brand-desc { margin-top: 12px; }
  .brand-points { gap: 11px; }
  .auth-panel { padding: 34px 38px 22px; }
}

@media (max-width: 900px) {
  body.guest { padding: 0; display: block; align-items: stretch; overflow-x: hidden; }
  .auth-shell {
    display: block; width: 100%; max-width: 100%; min-height: 100vh;
    border: 0; border-radius: 0; background: #fff; box-shadow: none;
    animation: authFade .5s ease both;
  }
  .auth-brand { display: none; }
  .auth-panel {
    width: auto; max-width: none; margin: 0; padding: 40px 22px 30px; position: relative;
    min-height: 100vh; justify-content: center;
  }
  .auth-panel::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 280px; pointer-events: none;
    background: radial-gradient(115% 100% at 50% 0%, rgba(37, 99, 235, .09), rgba(37, 99, 235, 0) 68%);
  }
  .auth-panel > * { position: relative; z-index: 1; }
  .auth-mini { display: flex; }
  .auth-head { margin-top: 0; }
  .auth-hint { text-align: left; margin-top: 16px; }
  .auth-foot { margin-top: 30px; padding-top: 0; }
}
@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  body.guest::before, .auth-shell, .dot-live, .auth-alert { animation: none !important; }
  .auth-submit::before { display: none; }
}

@media (max-width: 860px) {
  body.admin { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar .brand { padding: 12px 14px; flex: none; }
  .sidebar .brand small, .side-group, .sidebar .side-foot { display: none; }
  .side-nav { flex-direction: row; padding: 8px; gap: 4px; }
  .side-nav a { white-space: nowrap; padding: 7px 10px; font-size: 12.5px; }
  .side-nav a svg { display: none; }
  .topbar { padding: 12px 16px; }
  .page { padding: 14px; }
  .filter-bar .input, .filter-bar .select { min-width: 120px; flex: 1; }
}

@media (max-width: 420px) {
  .quick-stats { gap: 8px; }
  .quick-stat .num { font-size: 17px; }
  .h5-main { padding: 12px 12px 18px; }
}

/* ---------- 客户卡片：创建日期 ---------- */
.cust-date {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; letter-spacing: .2px; color: var(--muted-2);
  margin-bottom: 3px;
}
.cust-date .wk { color: #94a3b8; }
/* ---------- 日期选择器（日历内带星期） ---------- */
body.pk-lock { overflow: hidden; }
.pk-mask {
  position: fixed; inset: 0; z-index: 900; display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(15, 23, 42, .45);
}
.pk-mask.on { display: flex; animation: pkFade .16s ease both; }
@keyframes pkFade { from { opacity: 0; } to { opacity: 1; } }

.pk-panel {
  width: 100%; max-width: 430px; background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -22px 50px -22px rgba(15, 23, 42, .45);
  animation: pkUp .24s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes pkUp { from { transform: translateY(26px); opacity: .65; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) {
  .pk-mask { align-items: center; }
  .pk-panel { border-radius: 18px; max-width: 384px; box-shadow: 0 30px 70px -30px rgba(15, 23, 42, .6); }
  @keyframes pkUp { from { transform: scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
}

.pk-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
.pk-title { font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: -.1px; }
.pk-nav {
  width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f5f9;
  color: #475569; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s;
}
.pk-nav:hover { background: #e6ecf5; }
.pk-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 0 6px; }
.pk-week span { text-align: center; font-size: 11px; font-weight: 600; color: #94a3b8; }
.pk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.pk-day {
  border: 0; background: transparent; border-radius: 10px; padding: 5px 0 4px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer; color: var(--text); transition: background .12s;
}
.pk-day:hover { background: #f1f5f9; }
.pk-day b { font-size: 14.5px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pk-day small { font-size: 9.5px; line-height: 1; color: #a8b3c4; }
.pk-day.dim { color: #cbd5e1; }
.pk-day.dim small { color: #e2e8f0; }
.pk-day.today { background: #eff6ff; }
.pk-day.today b { color: #2563eb; }
.pk-day.today small { color: #60a5fa; }
.pk-day.sel { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .95); }
.pk-day.sel b, .pk-day.sel small { color: #fff; }
.pk-day.sel:hover { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.pk-wk-weekend { color: #f59e0b !important; }
.pk-day.dim .pk-wk-weekend { color: #fcd8a0 !important; }
.pk-day.sel .pk-wk-weekend { color: #fff !important; }

.pk-time {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 10px 2px 2px; border-top: 1px solid var(--line-2);
}
.pk-time-label { font-size: 12px; color: var(--muted); flex: none; }
.pk-time select {
  flex: 1; height: 38px; border: 1px solid #e3e9f2; border-radius: 10px;
  background: #f8fafc; font-size: 13px; color: var(--text); padding: 0 8px;
}
.pk-colon { color: var(--muted-2); font-size: 13px; }

.pk-quick { display: flex; gap: 8px; padding: 8px 2px 10px; }
.pk-quick button {
  flex: 1; height: 34px; border: 1px solid #e3e9f2; background: #fff; border-radius: 10px;
  font-size: 12.5px; color: #475569; cursor: pointer; transition: background .15s, border-color .15s;
}
.pk-quick button:hover { background: #f8fafc; border-color: #cfd9e6; color: #2563eb; }

.pk-foot { display: flex; gap: 10px; }
.pk-btn {
  flex: 1; height: 44px; border-radius: 12px; border: 1px solid #e3e9f2; background: #fff;
  font-size: 14px; color: #475569; cursor: pointer;
}
.pk-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; border: 0; font-weight: 600;
  box-shadow: 0 14px 26px -14px rgba(37, 99, 235, .95);
}

/* 日期输入框：右侧日历图标 + 选中后的星期回显 */
input[data-picker] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%239aa7ba' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 11h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 40px;
  cursor: pointer;
}
input[data-picker]:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 11h18'/%3E%3C/svg%3E");
}
.pk-echo { display: none; }
.pk-echo.on {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 7px; padding: 3px 9px; border-radius: 8px;
  background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 600;
}

/* ---------- 客户删除危险区 ---------- */
.danger-zone {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fffafa, #fff);
}
.danger-zone .card-head h3 { display: inline-flex; align-items: center; gap: 5px; }
.danger-zone details > summary::-webkit-details-marker { display: none; }
.danger-zone details[open] > summary { margin-bottom: 2px; }

/* ---------- 客户回收站 ---------- */
.rc-card {
  background: #fff; border: 1px solid var(--line-2); border-radius: 13px;
  padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
  position: relative;
}
.rc-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: #cbd5e1;
}
.rc-card .name { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.rc-card .meta {
  font-size: 12px; color: var(--muted); margin-top: 6px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px;
}
.rc-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin: 10px 0 11px; padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--muted-2);
}
.rc-card .btn { margin-top: 0; }

/* ---------- 业绩排行（业务员数量不限，超出滚动） ---------- */
.rank-list {
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: -2px -2px 0;
  padding: 0 2px;
}
.rank-list::-webkit-scrollbar { width: 6px; }
.rank-list::-webkit-scrollbar-thumb { background: #d8dee8; border-radius: 3px; }
.rank-list > div:last-child { border-bottom: 0 !important; }

/* ---------- 客户地址块：定位 → 市 / 区 → 详细地址 ---------- */
.addr-block { margin-bottom: 18px; }
.addr-block > label:first-child { margin-bottom: 9px; }
.addr-geo { min-height: 42px; font-weight: 500; }
.geo-box {
  margin-top: 9px; padding: 10px 12px; border-radius: 10px;
  background: #f8fafc; border: 1px solid #e6ecf3;
  font-size: 12.5px; line-height: 1.65; color: var(--text-2);
}
.geo-box:empty { display: none; }
.addr-region {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 13px;
}
.addr-cell .sub-label {
  display: block; font-size: 12.5px; font-weight: 500;
  color: var(--muted); margin-bottom: 5px;
}
.addr-block .sub-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}
.addr-block .sub-label .req { color: var(--danger); margin-left: 2px; }
.addr-block .chip-wrap .check-chip { padding: 6px 11px; font-size: 12.5px; }
