/* ============================================================
 * 苏州优尼威客户管理系统 - 样式
 * ============================================================ */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ============ 加载页 ============ */
.page-loading {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: var(--text-3);
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 登录页 ============ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 40px 32px 32px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.login-logo {
  width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 14px;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
}
.login-logo svg { width: 32px; height: 32px; fill: var(--primary); }
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 28px; }
.login-hint {
  margin-top: 20px; padding: 10px 14px; background: var(--primary-light);
  border-radius: var(--radius-sm); font-size: 12.5px; color: #1e40af; text-align: center;
}

/* ============ 表单通用 ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input:disabled, .textarea:disabled, .select:disabled {
  background: var(--bg); color: var(--text-3); cursor: not-allowed;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; display: none; }
.field-error.show { display: block; }
.field-ok { color: var(--success); font-size: 12.5px; margin-top: 5px; display: none; }
.field-ok.show { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: none; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background .15s, opacity .15s; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--text-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 22px; font-size: 15.5px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }

/* ============ 应用布局 ============ */
.layout { display: flex; min-height: 100vh; }

/* 侧边栏（桌面） */
.sidebar {
  width: 224px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0;
  z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px; border-radius: 9px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-brand .brand-icon svg { width: 20px; height: 20px; fill: #fff; }
.sidebar-brand .brand-name { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.35; }
.sidebar-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-radius: var(--radius-sm); color: var(--sidebar-text); cursor: pointer;
  font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s;
  border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; fill: currentColor; }
.nav-item:hover { color: #e2e8f0; background: rgba(255, 255, 255, .06); }
.nav-item.active { color: var(--sidebar-text-active); background: var(--primary); }
.sidebar-user {
  padding: 16px; border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { color: #e2e8f0; font-size: 13.5px; font-weight: 600; }
.sidebar-user .user-role { color: var(--sidebar-text); font-size: 11.5px; }
.logout-btn {
  background: none; border: none; color: var(--sidebar-text); cursor: pointer;
  padding: 6px; border-radius: 6px; display: flex; align-items: center;
}
.logout-btn:hover { color: #f87171; background: rgba(255, 255, 255, .06); }
.logout-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* 主区域 */
.main { flex: 1; margin-left: 224px; padding: 24px 28px 40px; min-width: 0; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 700; }
.page-desc { color: var(--text-3); font-size: 13px; margin-top: 3px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ 统计卡片 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--primary-light); } .stat-icon.blue svg { fill: var(--primary); }
.stat-icon.green { background: var(--success-light); } .stat-icon.green svg { fill: var(--success); }
.stat-icon.amber { background: var(--warning-light); } .stat-icon.amber svg { fill: var(--warning); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }

/* ============ 卡片 ============ */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.card-head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 18px 20px; }

/* ============ 客户列表 ============ */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { flex: 1; min-width: 200px; position: relative; }
.search-box .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: var(--text-3); pointer-events: none;
}
.search-box .input { padding-left: 36px; }
.toolbar .select { width: auto; min-width: 130px; }

/* 统计条 */
.summary-bar {
  background: var(--surface); border-radius: var(--radius); padding: 12px 18px;
  margin-bottom: 14px; box-shadow: var(--shadow); font-size: 14px; color: var(--text-2);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.summary-bar b { color: var(--text); font-weight: 700; }
.summary-bar .summary-amount { color: #b45309; font-size: 16px; }

/* 表格横向滚动容器 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table-wrap { overflow: visible; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
.data-table th {
  text-align: left; padding: 11px 14px; background: #f8fafc; color: var(--text-3);
  font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr { transition: background .12s; }
.data-table tbody tr:hover { background: #f8fafc; }
.c-name { font-weight: 600; color: var(--primary); cursor: pointer; }
.c-name:hover { text-decoration: underline; }
.c-req { max-width: 220px; color: var(--text-2); font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-date { color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 6px; border: none; background: none;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.icon-btn svg { width: 16px; height: 16px; fill: var(--text-3); }
.icon-btn:hover { background: var(--bg); }
.icon-btn.edit:hover svg { fill: var(--primary); }
.icon-btn.del:hover svg { fill: var(--danger); }

/* 合同列样式 */
.ct-no-cell { font-family: monospace; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--text); }
.ct-date-cell { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.ct-amount-cell { font-weight: 700; color: #b45309; white-space: nowrap; text-align: right; }

/* 分页控件 */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; flex-wrap: wrap;
}
.page-left { display: flex; align-items: center; gap: 8px; }
.page-numbers { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 6px; border: 1.5px solid var(--border);
  border-radius: 6px; background: #fff; color: var(--text-2); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all .12s; font-family: inherit;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { color: var(--text-3); font-size: 13px; padding: 0 2px; }
.page-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-info { font-size: 13px; color: var(--text-2); }
.page-info b { color: var(--text); }
.page-jump { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.page-jump-input { width: 52px; padding: 5px 8px; font-size: 13px; }

/* 移动端客户卡片 */
.mobile-cards { display: none; }

/* 空状态 */
.empty { text-align: center; padding: 54px 20px; color: var(--text-3); }
.empty svg { width: 52px; height: 52px; fill: #cbd5e1; margin-bottom: 12px; }
.empty p { font-size: 14px; margin-bottom: 16px; }

/* ============ 徽章 ============ */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-admin { background: var(--primary-light); color: #1e40af; }
.badge-sales { background: var(--success-light); color: #166534; }

/* ============ 列表（最近/排行） ============ */
.mini-list { list-style: none; }
.mini-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--border); gap: 10px;
}
.mini-list li:last-child { border-bottom: none; }
.mini-list .m-name { font-weight: 600; font-size: 14px; }
.mini-list .m-sub { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.rank-num {
  width: 22px; height: 22px; border-radius: 6px; background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-2); flex-shrink: 0;
}
.rank-num.r1 { background: #fef3c7; color: #b45309; }
.rank-num.r2 { background: #e2e8f0; color: #475569; }
.rank-num.r3 { background: #ffedd5; color: #c2410c; }

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 18px; backdrop-filter: blur(2px);
}
.modal-box {
  background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
  max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 2; border-radius: 14px 14px 0 0;
}
.modal-title { font-size: 16.5px; font-weight: 700; }
.modal-close {
  border: none; background: none; cursor: pointer; padding: 5px; border-radius: 6px;
  display: flex; color: var(--text-3);
}
.modal-close:hover { background: var(--bg); }
.modal-close svg { width: 18px; height: 18px; fill: currentColor; }
.modal-body { padding: 20px 22px; }

/* 详情 */
.detail-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 84px; flex-shrink: 0; color: var(--text-3); font-size: 13px; padding-top: 1px; }
.detail-value { flex: 1; font-size: 14px; line-height: 1.6; word-break: break-word; }

.log-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.log-item:last-child { border-bottom: none; }
.log-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.log-action {
  padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600;
  background: var(--primary-light); color: #1e40af;
}
.log-action.create { background: var(--success-light); color: #166534; }
.log-action.requirement { background: var(--warning-light); color: #92400e; }
.log-meta { color: var(--text-3); font-size: 12px; }
.log-diff { background: #f8fafc; border-radius: 6px; padding: 10px 12px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.log-diff .old { color: var(--text-3); text-decoration: line-through; word-break: break-word; }
.log-diff .arrow { color: var(--primary); margin: 3px 0; font-weight: 700; }
.log-diff .new { color: var(--text); word-break: break-word; }

/* ============ Toast ============ */
.toast-root {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  width: min(92vw, 380px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px; padding: 12px 16px;
  background: #0f172a; color: #fff; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow-lg); animation: toastIn .25s ease-out;
  pointer-events: auto;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast svg { width: 17px; height: 17px; fill: #fff; flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
.toast.out { animation: toastOut .25s ease-in forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ============ 销售报表 ============ */
.bar-chart {
  display: flex; align-items: stretch; gap: 6px; height: 200px;
  padding-top: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.bar-col {
  flex: 1; min-width: 38px; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
}
.bar {
  width: 100%; max-width: 42px; min-height: 3px;
  background: linear-gradient(180deg, #3b82f6, var(--primary));
  border-radius: 6px 6px 0 0;
  transition: height .4s ease;
}
.bar.zero { background: var(--border); }
.bar-label { font-size: 11px; color: var(--text-2); margin-top: 6px; white-space: nowrap; }
.bar-val { font-size: 10.5px; color: var(--text-2); margin-bottom: 4px; white-space: nowrap; }
.ratio-bar {
  width: 100%; max-width: 120px; height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden; margin-bottom: 3px;
}
.ratio-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, var(--primary));
  transition: width .4s ease;
}

/* ============ 移动端底栏 ============ */
.mobile-nav { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 14px 14px calc(80px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(15, 23, 42, .06);
  }
  .m-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; border: none; background: none; color: var(--text-3);
    font-size: 11px; font-family: inherit; cursor: pointer; border-radius: 8px;
    font-weight: 500;
  }
  .m-nav-item svg { width: 21px; height: 21px; fill: currentColor; }
  .m-nav-item.active { color: var(--primary); }
  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
  }
  .mobile-topbar .tb-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
  .mobile-topbar .tb-title .brand-icon {
    width: 30px; height: 30px; border-radius: 8px; background: var(--primary);
    display: flex; align-items: center; justify-content: center;
  }
  .mobile-topbar .tb-title .brand-icon svg { width: 17px; height: 17px; fill: #fff; }
  .mobile-topbar .logout-btn { color: var(--text-3); }

  /* 表格换成卡片 */
  .data-table-wrap { display: none; }
  .mobile-cards { display: flex; flex-direction: column; gap: 10px; }
  .cust-card {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 14px 15px; cursor: pointer; transition: transform .1s;
    border: 1px solid transparent;
  }
  .cust-card:active { transform: scale(.985); }
  .cust-card .cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
  .cust-card .cc-name { font-weight: 700; font-size: 15px; color: var(--primary); }
  .cust-card .cc-badge { flex-shrink: 0; }
  .cust-card .cc-req {
    color: var(--text-2); font-size: 13px; margin-top: 7px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .cust-card .cc-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border);
  }
  .cust-card .cc-sales { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
  .cust-card .cc-sales .avatar { width: 20px; height: 20px; font-size: 10px; }
  .cust-card .cc-date { font-size: 11.5px; color: var(--text-3); }

  .stat-value { font-size: 21px; }
  .page-title { font-size: 17px; }
  .login-card { padding: 32px 24px 26px; }
  .toolbar .select { flex: 1; min-width: 0; }
  .pagination { justify-content: center; }
  .page-numbers { display: none; }
  .page-jump { display: none; }
  .page-info { font-size: 12px; }
}
@media (min-width: 769px) {
  .mobile-topbar { display: none; }
}

/* ============ 成交状态 ============ */
.badge-deal { background: var(--success-light); color: #166534; }
.badge-undeal { background: #f1f5f9; color: var(--text-2); }

.deal-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.deal-toggle input { display: none; }
.deal-switch {
  width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1;
  position: relative; transition: background .18s; flex-shrink: 0;
}
.deal-switch .deal-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: left .18s;
}
.deal-toggle input:checked + .deal-switch { background: var(--success); }
.deal-toggle input:checked + .deal-switch .deal-knob { left: 23px; }
.deal-text { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.deal-toggle input:checked ~ .deal-text { color: var(--success); }

.log-action.deal { background: var(--success-light); color: #166534; }

/* ============ 所属省份 ============ */
.badge-province { background: #eef2ff; color: #4338ca; white-space: nowrap; }
.log-action.province { background: #eef2ff; color: #4338ca; }
.cc-province {
  font-size: 12px; color: #4338ca; background: #eef2ff;
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  margin: 6px 0 2px; font-weight: 600; width: fit-content;
}

/* ============ 联系人/手机号 ============ */
.cc-contact {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--text-2); margin: 6px 0 2px;
}
.cc-contact span { display: inline-flex; align-items: center; gap: 4px; }
.cc-contact svg { width: 14px; height: 14px; opacity: .6; }
.cc-contact em { font-style: normal; font-weight: 600; }
.log-action.contact { background: #ecfdf5; color: #065f46; }
.log-action.phone { background: #fef3c7; color: #92400e; }

/* ============ 合同信息 ============ */
.contract-mini {
  display: inline-block; margin-left: 6px; padding: 2px 8px;
  font-size: 11.5px; border-radius: 999px;
  background: #fffbeb; color: #92400e; white-space: nowrap;
}
.cc-contracts {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #92400e; font-weight: 600;
  margin: 6px 0 2px;
}
.cc-contracts svg { width: 14px; height: 14px; opacity: .7; }
.cc-contract-list { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 4px; }
.cc-contract-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #f8fafc; border-radius: 8px; padding: 8px 10px;
}
.cc-contract-row > div { display: flex; flex-direction: column; gap: 2px; }
.cc-contract-row .cc-ct-no { font-family: monospace; font-weight: 700; font-size: 12.5px; color: var(--text); }
.cc-contract-row .cc-ct-date { font-size: 11.5px; color: var(--text-3); }
.cc-contract-row .cc-ct-amount { font-weight: 700; color: #b45309; font-size: 13px; white-space: nowrap; }
.contract-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.contract-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px;
}
.ct-no { font-weight: 700; font-size: 13.5px; font-family: monospace; }
.ct-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ct-right { text-align: right; flex-shrink: 0; }
.ct-amount { font-weight: 700; color: #b45309; font-size: 14px; }
.ct-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.log-action.contract { background: #fffbeb; color: #92400e; }
