/* ============================================================
   全局基础样式优化
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

input, textarea, select, button {
    font-family: inherit;
}

/* 表单控件统一box-sizing */
.form-control, input[type="text"], input[type="number"], input[type="date"], 
input[type="email"], input[type="password"], textarea, select {
    box-sizing: border-box;
}

/* 手机端菜单按钮：电脑端默认隐藏，手机端媒体查询中显示 */
.mobile-menu-toggle {
    display: none;
}

﻿/* ============================================================
   鍏ㄥ眬鏍峰紡
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --sidebar-bg: #1c2534;
  --sidebar-text: #cbd5e1;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
.mono { font-family: Consolas, "Courier New", monospace; }
.muted { color: var(--muted); font-size: 12.5px; }
.num { text-align: right; }
.ok { color: var(--success); }
.no { color: var(--danger); }

/* ---------------- 鐧诲綍椤?---------------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  padding: 20px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
  background: #fff; border-radius: 14px; padding: 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-card .table { margin-top: 10px; }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand .brand-logo { margin: 0 auto 10px; }
.login-brand h1 { font-size: 19px; color: #0f172a; }
.login-brand p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.login-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 170px; flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-logo.lg { width: 54px; height: 54px; font-size: 28px; border-radius: 14px; }
.brand-name { color: #fff; font-weight: 700; font-size: 16px; }
.brand-sub { color: #94a3b8; font-size: 11px; margin-top: 2px; }

.nav { padding: 14px 10px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-bottom: 4px;
  border-radius: 8px; color: var(--sidebar-text);
  font-size: 14px; transition: background .15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.sidebar-foot { padding: 14px 18px; font-size: 11px; color: #64748b; border-top: 1px solid rgba(255,255,255,.06); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 17px; font-weight: 700; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 600; }
.role-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-boss { background: #fef3c7; color: #92400e; }
.badge-specialist { background: #dbeafe; color: #1e40af; }

.content { padding: 24px; flex: 1; }
.footer {
  padding: 14px 24px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--border); background: #fff;
}

/* ---------------- 鍗＄墖 ---------------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 20px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 15px; color: #0f172a; }
.card-head-right { display: flex; align-items: center; gap: 10px; }
.card-body { padding: 18px; }
.card-body.table-wrap { padding: 0; overflow-x: auto; }
.link { font-size: 13px; }

/* ---------------- 琛ㄥ崟 ---------------- */
.form-group { margin-bottom: 14px; flex: 1; min-width: 0; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #334155; font-weight: 600; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control-sm { padding: 5px 8px; font-size: 13px; width: auto; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.filter-form .form-row { align-items: flex-end; }
.filter-btn { display: flex; gap: 8px; padding-bottom: 0; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.inline-details { display: inline-block; }
.inline-details summary { cursor: pointer; list-style: none; }
.inline-details[open] summary { margin-bottom: 6px; }

/* ---------------- 鎸夐挳 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s;
  background: #e2e8f0; color: var(--text);
}
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warn { background: var(--warning); color: #fff; }
.btn-ghost { background: transparent; border-color: #cbd5e1; }
.btn-ghost:hover { background: #f8fafc; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------------- 鎻愮ず ---------------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ---------------- 琛ㄦ牸 ---------------- */
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: 13.5px; white-space: nowrap;
}
.table th { background: #f8fafc; color: #475569; font-weight: 600; }
.table tbody tr:hover { background: #f8fafc; }
.td-limit { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-actions { display: flex; gap: 8px; align-items: center; }
.td-actions form { margin: 0; }

/* ---------------- 寰芥爣 ---------------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-muted { background: #e2e8f0; color: #475569; }
.badge-boss-tag { background: #fef3c7; color: #92400e; }
.badge-specialist-tag { background: #dbeafe; color: #1e40af; }

/* ---------------- 杩涘害鏉?---------------- */
.progress { height: 8px; background: #e2e8f0; border-radius: 20px; overflow: hidden; margin: 8px 0 4px; }
.progress-bar { height: 100%; border-radius: 20px; transition: width .4s; }
.prog-good { background: var(--success); }
.prog-mid { background: var(--warning); }
.prog-bad { background: var(--danger); }
.stat-foot { font-size: 12px; }

/* ---------------- 缁熻鍗＄墖 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; width: 100%; }
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 24px;
  transition: all 0.3s ease;
}
.stat-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 800; color: #0f172a; margin: 6px 0; }
.stat-value.stat-red, .stat-link .stat-link-inner:hover .stat-value.stat-red { color: #dc2626; }
.stat-unit { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat-foot { font-size: 12.5px; color: var(--muted); }

/* ---------------- 澶嶅埗鐢佃瘽鎸夐挳 ---------------- */
.copy-phone-btn {
  background: #dc2626; color: #fff; border: none; border-radius: 6px;
  padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.copy-phone-btn:hover:not(:disabled) { background: #b91c1c; }
.copy-phone-btn.copied {
  background: #9ca3af; color: #fff; cursor: pointer;
}
.copy-phone-btn.copied:hover { background: #6b7280; }
.copy-phone-btn:disabled {
  opacity: 0.55; cursor: not-allowed;
}
.copy-phone-btn.copied:disabled {
  background: #9ca3af; opacity: 0.7;
}

/* ---------------- AI杈呭姪鏈哄櫒浜哄浘鏍囨寜閽?---------------- */
.ai-assist-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; border: none; cursor: pointer;
  box-shadow: 0 2px 6px rgba(59,130,246,0.35);
  transition: transform .15s, box-shadow .15s;
  padding: 0;
}
.ai-assist-icon-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(59,130,246,0.5);
}
.ai-assist-icon-btn svg {
  width: 18px; height: 18px;
}

/* ---------------- 瀹㈡埛淇℃伅鍗＄墖 ---------------- */
.customer-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow .15s;
}
.customer-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.customer-card-header {
  background: #f8fafc;
  margin-bottom: 10px;
}
.customer-table {
  margin-bottom: 0;
  width: 100%;
}
.customer-table thead th {
  background: transparent;
  border-bottom: 1px solid #e5e7eb;
}
.customer-table .copy-row {
  background: #f0f7ff;
}
.customer-table .copy-row td {
  padding: 10px 16px;
  border-top: 1px solid #dbeafe;
}

/* ---------------- 琛ㄦ牸绮楁í绾垮垎闅?---------------- */
.friend-follow-table .record-sep td,
.records-table .record-sep td {
  height: 5px;
  background: #1f2937;
  padding: 0;
  border: none;
}

.edit-modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 9999; justify-content: center; align-items: center;
}
.edit-modal-overlay.active { display: flex; }
.edit-modal {
  background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px;
  max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.edit-modal h3 { margin: 0 0 16px 0; font-size: 18px; }
.edit-modal .form-row { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.edit-modal .form-item label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: #374151; }
.edit-modal .form-item input { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.edit-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- 杩蜂綘杩涘害鏉★紙鎶ヨ〃锛?---------------- */
.mini-bar {
  display: inline-block; width: 90px; height: 8px;
  background: #e2e8f0; border-radius: 20px; overflow: hidden;
  vertical-align: middle;
}
.mini-bar-fill { height: 100%; border-radius: 20px; }
.mini-bar-text { font-size: 12px; margin-left: 8px; vertical-align: middle; font-weight: 600; }

/* ---------------- 鍏朵粬 ---------------- */
.empty { color: var(--muted); text-align: center; padding: 28px 0; }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pager { display: flex; gap: 6px; padding: 14px; flex-wrap: wrap; }
.page-link {
  padding: 6px 11px; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 13px; background: #fff;
}
.page-link.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------------- v2锛氬脊绐?---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 900px;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15px; }
.modal-close { border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--border); background: #f8fafc;
}

/* ---------------- v2锛氬綍鍏ユ煡閲嶆彁绀?---------------- */
.field-hint { margin-top: 6px; font-size: 12.5px; }
.dup-warn { color: var(--danger); font-weight: 600; }
.dup-ok { color: var(--success); font-weight: 600; }

/* ---------------- v2锛氬尯鍧楁爣棰?---------------- */
.sec-title { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: #0f172a; }
.sec-divider { border: none; border-top: 1px dashed var(--border); margin: 22px 0; }
.req { color: var(--danger); }
.link-btn {
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--primary); font-size: 13.5px; text-decoration: underline;
}
.link-btn:hover { color: var(--primary-dark); }

/* ---------------- v2锛氱粺璁″崱閾炬帴 / 灏忓崱 ---------------- */
.stat-link .stat-link-inner { display: block; color: inherit; }
.stat-link .stat-link-inner:hover .stat-value { color: var(--primary); }
.small-grid .stat-card { padding: 12px; }
.small-grid .stat-value { font-size: 22px; }

/* ---------------- v2锛氳€冩牳鏃ュ巻 ---------------- */
.cal-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.cal-head {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 4px 0;
}
.cal-cell {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px;
  min-height: 74px; background: #fff; position: relative;
  cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.cal-cell:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,.15); }
.cal-cell .cal-date { font-size: 12px; font-weight: 700; color: #334155; }
.cal-cell .cal-week { font-size: 10.5px; color: var(--muted); }
.cal-cell .cal-target { margin-top: 5px; font-size: 11.5px; color: #475569; line-height: 1.35; }
.cal-cell .cal-meta { margin-top: 4px; font-size: 10.5px; }
.cal-cell.future { background: #fafafa; cursor: default; }
.cal-cell.today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.cal-cell.no-assess { background: #f8fafc; }
.cal-cell.no-assess .cal-target { color: var(--muted); text-decoration: line-through; }
.cal-cell.has-override { border-style: dashed; border-color: var(--warning); }
.tag-free { display: inline-block; background: #f1f5f9; color: var(--muted); border-radius: 4px; padding: 1px 6px; font-size: 10.5px; }
.tag-override { display: inline-block; background: #fef3c7; color: #92400e; border-radius: 4px; padding: 1px 6px; font-size: 10.5px; }
.tag-month { display: inline-block; background: #dbeafe; color: #1e40af; border-radius: 4px; padding: 1px 6px; font-size: 10.5px; }

/* ---------------- v2锛氭垚鍗?鎰忓悜寰芥爣 ---------------- */
.badge-deal { background: #dcfce7; color: #166534; }
.badge-intent-strong { background: #fee2e2; color: #991b1b; }
.badge-intent-normal { background: #fef3c7; color: #92400e; }
.badge-intent-unreplied { background: #e2e8f0; color: #475569; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }

@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .brand-text, .nav-item span, .sidebar-foot { display: none; }
  .brand { justify-content: center; }
  .nav-item { justify-content: center; }
  .content { padding: 16px; }
}

/* ============================================================
   v3锛氱瓑瀹藉竷灞€锛堟墍鏈夊唴瀹瑰尯鍧楀敖閲忕瓑瀹戒笖杈冨锛?   ============================================================ */
.content { max-width: 100%; margin: 0; width: 100%; padding: 20px 28px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card-head, .card-body { }
/* 鍗＄墖涓庣粺璁″崱缁熶竴涓鸿緝瀹界瓑瀹藉鍣?*/
.card { width: 100%; }
.stat-card { width: 100%; }

/* ============================================================
   v3锛欰I 鏅鸿兘鎮诞鍔╂墜
   ============================================================ */
.ai-fab {
  position: fixed; left: auto !important; right: 22px !important; bottom: 22px; z-index: 950;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .5);
  transition: transform .15s, box-shadow .15s;
}
.ai-fab:hover { transform: scale(1.07); box-shadow: 0 10px 26px rgba(37, 99, 235, .6); }
.ai-fab svg { width: 28px; height: 28px; }
.ai-fab-tag {
  position: absolute; top: -5px; right: -5px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px; line-height: 1.2;
}
.ai-fab-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, .55);
  animation: aiPulse 2s ease-out infinite; pointer-events: none;
}
@keyframes aiPulse {
  0% { transform: scale(.85); opacity: .9; }
  100% { transform: scale(1.55); opacity: 0; }
}

.ai-panel {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 960;
  width: 480px; max-width: calc(100vw - 40px);
  height: min(78vh, 680px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  display: none; flex-direction: column; overflow: hidden;
}
.ai-panel.open { display: flex; }
.ai-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
}
.ai-panel-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ai-panel-title-row { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; min-width: 0; }
.ai-panel-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; flex-shrink: 0; }
.ai-panel-sub { font-size: 12px; opacity: .85; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 16px; }
.ai-panel-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ai-icon-btn {
  background: rgba(255,255,255,.16); color: #fff; border: none; border-radius: 6px;
  padding: 4px 9px; font-size: 12px; cursor: pointer;
}
.ai-icon-btn:hover { background: rgba(255,255,255,.28); }
.ai-close { border: none; background: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.ai-close:hover { color: #fca5a5; }

.ai-tabs { display: flex; border-bottom: 1px solid var(--border); background: #f8fafc; }
.ai-tab {
  flex: 1; padding: 10px 6px; text-align: center; font-size: 13px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; user-select: none;
}
.ai-tab:hover { color: var(--primary); }
.ai-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: #fff; }

.ai-body { flex: 1; overflow: auto; padding: 14px; background: #f8fafc; }
.ai-hide { display: none !important; }
.ai-welcome { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.ai-welcome-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.ai-welcome p { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.ai-welcome ul { margin: 6px 0; padding-left: 20px; }
.ai-welcome li { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* AI消息 */
.ai-msg { display: flex; margin-bottom: 12px; }
.ai-msg.user { justify-content: flex-end; }
.ai-msg.assistant { justify-content: flex-start; }
.ai-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.ai-msg.user .ai-bubble {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg.assistant .ai-bubble {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.ai-bubble strong { font-weight: 600; }
.ai-bubble code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
}
.ai-num { color: var(--primary); font-weight: 600; }

/* AI加载提示 */
.ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.ai-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* AI输入栏 */
.ai-inputbar {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.ai-inputbar textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.ai-inputbar textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.ai-inputbar .btn {
  align-self: flex-end;
  padding: 10px 20px;
  font-size: 14px;
}

/* AI上传区域 */
.ai-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.ai-upload-row input[type="file"] {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.ai-upload-result {
  margin-top: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
}

/* ========== AI知识库优化样式 ========== */
.ai-kb-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.ai-kb-form .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.ai-kb-form .form-group {
  flex: 1;
  margin-bottom: 0;
}
.ai-kb-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.ai-kb-form .form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ai-kb-form .form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.ai-kb-form textarea#kbContent {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}
.ai-kb-form .form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ai-kb-form .btn {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.ai-kb-form .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}
.ai-kb-form .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.ai-kb-form .btn-ghost {
  background: #f1f5f9;
  color: var(--muted);
}
.ai-kb-form .btn-ghost:hover {
  background: #e2e8f0;
}

/* 知识库列表 */
.ai-kb-list {
  margin-top: 8px;
}
.ai-kb-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ai-kb-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 知识库条目头部 */
.ai-kb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.ai-kb-cat {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}
.ai-kb-head strong {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-kb-ops {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}
.ai-kb-ops .link-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ai-kb-ops .link-btn:first-child {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.ai-kb-ops .link-btn:first-child:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.ai-kb-ops .link-btn:last-child {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}
.ai-kb-ops .link-btn:last-child:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* 知识库条目内容 */
.ai-kb-content {
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}
.ai-kb-content::-webkit-scrollbar {
  width: 4px;
}
.ai-kb-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 2px;
}
.ai-kb-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

/* 知识库空状态 */
.ai-kb-list .muted {
  text-align: center;
  padding: 30px 20px;
  color: #94a3b8;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #e2e8f0;
}

/* 知识库标题 */
.ai-body .sec-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}



/* ============================================================ */
@media (max-width: 768px) {
  .layout { flex-direction: column; min-height: 100vh; }

  /* ========== 渚ц竟鏍忥細鏀逛负椤堕儴鍙姌鍙犲鑸?========== */
  .sidebar {
    width: 100% !important;
    position: relative !important;
    height: auto !important;
    padding: 0 !important;
    order: -1;
  }
  .sidebar .brand {
    padding: 12px 16px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar .brand-logo { width: 34px !important; height: 34px !important; font-size: 18px !important; }
  .sidebar .brand-name { font-size: 15px !important; }
  .sidebar .brand-sub { font-size: 11px !important; }

  /* 姹夊牎鑿滃崟鎸夐挳 */
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
  }
  .mobile-menu-toggle:hover { background: rgba(255,255,255,.2); }

  /* 瀵艰埅鑿滃崟锛氶粯璁ゆ敹璧凤紝鐐瑰嚮姹夊牎鎸夐挳灞曞紑 */
  .sidebar .nav {
    display: none;
    padding: 8px 12px !important;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .sidebar .nav.open { display: block; }
  .sidebar .nav-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    margin-bottom: 2px !important;
    border-radius: 8px !important;
  }
  .sidebar .nav-item svg { width: 18px !important; height: 18px !important; flex-shrink: 0 !important; }
  .sidebar .nav-item span { display: inline !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar .brand-text { display: block !important; }
  .sidebar-foot { display: none !important; }

  /* ========== 涓诲唴瀹瑰尯鍩?========== */
  .main { width: 100%; min-width: 0; }

  /* ========== 椤堕儴鏍?========== */
  .topbar {
    padding: 10px 14px !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-title { font-size: 16px !important; flex: 1; }
  .topbar-user {
    gap: 6px !important;
    flex-wrap: wrap;
  }
  .topbar-user .user-name { font-size: 13px; }
  .topbar-user .btn { padding: 5px 10px !important; font-size: 12px !important; }
  .role-badge { padding: 2px 8px !important; font-size: 11px !important; }

  /* ========== 鍐呭鍖哄煙 ========== */
  .content { padding: 14px !important; }

  /* ========== 鍗＄墖 ========== */
  .card {
    margin-bottom: 14px !important;
    border-radius: 10px !important;
  }
  .card-head {
    padding: 12px 14px !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  .card-head h2 { font-size: 15px !important; }
  .card-head-right { gap: 6px !important; }
  .card-body { padding: 14px !important; }
  .card-body.table-wrap { padding: 0 !important; }

  /* ========== 琛ㄦ牸锛氭í鍚戞粴鍔?========== */
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .table {
    min-width: 640px;
    font-size: 13px;
    width: 100%;
  }
  .table th, .table td {
    padding: 10px 8px !important;
    white-space: nowrap;
  }
  .records-table { min-width: 720px; }

  /* ========== 琛ㄥ崟 ========== */
  .form-row {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .form-group {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 12px !important;
  }
  .form-group label { font-size: 13px !important; }
  .form-control {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }
  .form-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .form-actions .btn { width: 100%; }

  /* 绛涢€夎〃鍗曠壒娈婂鐞?*/
  .filter-form .form-row {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
  .filter-form .form-group {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: calc(50% - 8px) !important;
  }
  .filter-form .filter-btn {
    flex: 1 1 100% !important;
    flex-direction: row !important;
  }

  /* ========== 鎸夐挳 ========== */
  .btn {
    padding: 9px 16px !important;
    font-size: 14px !important;
  }
  .btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  .td-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  /* ========== 缁熻鏂瑰潡锛?鍒?========== */
  .stat-grid,
  .stats-row,
  .dashboard-stats,
  [style*="grid-template-columns:repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .stat-card,
  .dashboard-stat {
    padding: 16px !important;
  }
  .stat-card .stat-value,
  .dashboard-stat .stat-value {
    font-size: 28px !important;
  }
  .stat-card .stat-label,
  .dashboard-stat .stat-label {
    font-size: 12px !important;
  }

  /* ========== 淇℃伅鍏ュ簱椤甸潰锛氬乏鍙冲竷灞€鏀逛负涓婁笅 ========== */
  [style*="display:flex"][style*="gap:16px"] {
    flex-direction: column !important;
  }
  [style*="display:flex"][style*="gap:16px"] > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .edit-modal-overlay {
    padding: 12px !important;
    align-items: flex-start !important;
    padding-top: 20px !important;
  }
  .edit-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    margin: 0 !important;
  }
  .edit-modal .modal-head { padding: 14px 16px !important; }
  .edit-modal .modal-body { padding: 14px 16px !important; }
  .edit-modal .modal-actions {
    padding: 12px 16px !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .edit-modal .modal-actions .btn { width: 100%; }

  /* ========== AI闈㈡澘 ========== */
  .ai-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
  }
  .ai-panel-head { padding: 12px 14px !important; flex-shrink: 0; }
  .ai-panel-title { font-size: 15px !important; }
  .ai-panel-sub { font-size: 12px !important; }
  .ai-body { padding: 12px !important; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  /* 修复：手机端AI输入框使用正确的类名ai-inputbar，确保在底部固定显示 */
  .ai-inputbar {
    display: flex !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    border-top: 1px solid var(--border) !important;
    background: #fff !important;
    flex-shrink: 0 !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  }
  .ai-inputbar textarea {
    flex: 1 !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    resize: none !important;
    max-height: 100px !important;
    min-height: 40px !important;
    line-height: 1.5 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  .ai-inputbar .btn {
    align-self: flex-end !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  .ai-msg { max-width: 88% !important; }
  .ai-bubble { font-size: 14px !important; padding: 10px 14px !important; }

  /* AI鏍囩椤?*/
  .ai-tab { padding: 10px 4px !important; font-size: 13px !important; }

  /* ========== AI鎮诞鎸夐挳 ========== */
  .ai-fab {
    width: 52px !important;
    height: 52px !important;
    right: 14px !important;
    bottom: 14px !important;
  }
  .ai-fab svg { width: 26px !important; height: 26px !important; }

  /* ========== 鍒嗛〉 ========== */
  .pagination {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  .pagination .btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }

  /* ========== 鎻愮ず淇℃伅 ========== */
  .alert {
    padding: 12px 14px !important;
    font-size: 14px !important;
  }
  .flash-msg {
    padding: 12px 14px !important;
    font-size: 14px !important;
  }

  /* ========== 杩涘害鏉?========== */
  .mini-bar { height: 8px !important; }
  .mini-bar-text { font-size: 12px !important; }

  /* ========== 鏍囩 ========== */
  .badge {
    font-size: 12px !important;
    padding: 3px 8px !important;
  }
  .tag-free {
    font-size: 12px !important;
    padding: 3px 10px !important;
  }

  /* ========== 绌虹姸鎬?========== */
  .empty {
    padding: 24px !important;
    font-size: 14px !important;
  }

  /* ========== 绮楁í绾垮垎闅?========== */
  .record-sep td { height: 4px !important; }

  /* ========== 澶嶅埗琛?璺熻繘淇℃伅琛?========== */
  .copy-row td {
    padding: 10px 8px !important;
    font-size: 13px !important;
  }

  /* ========== AI杈呭姪鎸夐挳 ========== */
  .ai-assist-icon-btn {
    width: 32px !important;
    height: 32px !important;
  }
  .ai-assist-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* ========== 鍏ュ簱瑙勫垯渚ц竟鏍?========== */
  [style*="position:sticky"] {
    position: relative !important;
    top: auto !important;
  }

  /* ========== 澶囦唤鏂囦欢鍒楄〃 ========== */
  [style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* ============================================================ */
@media (max-width: 480px) {
  /* 缁熻鏂瑰潡锛氬崟鍒?*/
  .stat-grid,
  .stats-row,
  .dashboard-stats,
  [style*="grid-template-columns:repeat(5"] {
    grid-template-columns: 1fr !important;
  }

  /* 瀵艰埅椤癸細2鍒?*/
  .sidebar .nav-item {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }

  /* 琛ㄦ牸锛氭洿灏忓瓧浣?*/
  .table {
    font-size: 12px;
    min-width: 580px;
  }
  .records-table { min-width: 680px; }
  .table th, .table td { padding: 8px 6px !important; }

  /* 椤堕儴鏍忥細鏇寸揣鍑?*/
  .topbar { padding: 8px 12px !important; }
  .page-title { font-size: 15px !important; }

  /* 鍐呭鍖哄煙锛氭洿灏忓唴杈硅窛 */
  .content { padding: 12px !important; }

  /* 鍗＄墖锛氭洿绱у噾 */
  .card-head { padding: 10px 12px !important; }
  .card-head h2 { font-size: 14px !important; }
  .card-body { padding: 12px !important; }

  /* AI闈㈡澘锛氬叏灞?*/
  .ai-panel {
    width: 100vw !important;
    height: 100vh !important;
  }

  /* 鎸夐挳锛氭洿灏?*/
  .btn { padding: 8px 14px !important; font-size: 13px !important; }
  .btn-sm { padding: 5px 10px !important; font-size: 11px !important; }

  /* 绛涢€夎〃鍗曪細鍗曞垪 */
  .filter-form .form-group {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }
}

/* ============================================================
   核心业务板块
   ============================================================ */
.core-business-section {
  margin-top: 32px;
}
.core-business-header {
  text-align: center;
  margin-bottom: 28px;
}
.core-business-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: 1px;
}
.core-business-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}
.core-business-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  margin: 12px auto 0;
}
.core-business-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.core-business-grid > .core-business-card {
  flex: 1;
  min-width: 220px;
}
.core-business-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.core-business-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-gradient, linear-gradient(90deg, #3b82f6, #8b5cf6));
}
.core-business-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border-color: #e2e8f0;
}
.core-business-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--icon-bg, linear-gradient(135deg, #dbeafe, #bfdbfe));
}
.core-business-icon svg {
  width: 28px;
  height: 28px;
  color: var(--icon-color, #2563eb);
}
.core-business-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}
.core-business-card-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px 0;
  line-height: 1.6;
}
.core-business-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.core-business-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--tag-bg, #eff6ff);
  color: var(--tag-color, #1e40af);
  font-weight: 500;
}

/* 不同业务卡片的主题色 */
.biz-card-1 {
  --card-gradient: linear-gradient(90deg, #3b82f6, #06b6d4);
  --icon-bg: linear-gradient(135deg, #dbeafe, #cffafe);
  --icon-color: #0284c7;
  --tag-bg: #eff6ff;
  --tag-color: #1e40af;
}
.biz-card-2 {
  --card-gradient: linear-gradient(90deg, #10b981, #059669);
  --icon-bg: linear-gradient(135deg, #d1fae5, #a7f3d0);
  --icon-color: #059669;
  --tag-bg: #ecfdf5;
  --tag-color: #065f46;
}
.biz-card-3 {
  --card-gradient: linear-gradient(90deg, #f59e0b, #f97316);
  --icon-bg: linear-gradient(135deg, #fef3c7, #fed7aa);
  --icon-color: #d97706;
  --tag-bg: #fffbeb;
  --tag-color: #92400e;
}
.biz-card-4 {
  --card-gradient: linear-gradient(90deg, #8b5cf6, #ec4899);
  --icon-bg: linear-gradient(135deg, #ede9fe, #fce7f3);
  --icon-color: #7c3aed;
  --tag-bg: #f5f3ff;
  --tag-color: #5b21b6;
}

/* 响应式：平板 */
@media (max-width: 1024px) {
  .core-business-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 响应式：手机 */
@media (max-width: 640px) {
  .core-business-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .core-business-title {
    font-size: 22px;
  }
  .core-business-card {
    padding: 24px 20px;
  }
}


/* ============================================================
   业务参考报价表
   ============================================================ */
.price-quotes-section {
  margin-top: 32px;
}
.price-quotes-header {
  text-align: center;
  margin-bottom: 24px;
}
.price-quotes-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: 1px;
}
.price-quotes-notice {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
  border: 1px solid #fcd34d;
}
.price-quotes-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* 报价分类区域 */
.price-category {
  margin-bottom: 28px;
}
.price-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}
.price-category-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.price-category-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}
.price-category-name {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  text-align: center;
}

/* 报价卡片网格 */
.price-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
}
.price-items-grid > .price-item-card {
  flex: 1 1 0;
  min-width: 240px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
}
.price-item-card {
  background: #fff;
  border-radius: 16px;
  padding: 0;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.price-item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-color: var(--item-color, #cbd5e1);
}
/* 顶部色条 */
.price-card-top-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--item-color, #3b82f6), var(--item-color, #3b82f6));
  opacity: 0.9;
}
/* 标题区域 */
.price-card-header {
  padding: 20px 20px 12px;
  text-align: center;
}
.price-item-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.4;
}
/* 价格区域 */
.price-card-price-area {
  padding: 8px 20px 16px;
  text-align: center;
}
.price-item-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--item-color, #3b82f6);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.price-item-price-note {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}
/* 分割线 */
.price-card-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0 20px;
}
/* 详情区域 */
.price-item-details {
  padding: 14px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price-item-detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}
.price-detail-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.price-detail-text {
  flex: 1;
}
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
  line-height: 1.5;
}
.price-item-detail-label {
  color: #94a3b8;
  flex-shrink: 0;
  min-width: 50px;
}
.price-item-extra {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}

/* 编辑按钮 */
.price-quotes-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.price-quotes-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 响应式：手机 */
@media (max-width: 640px) {
  .price-items-grid {
    grid-template-columns: 1fr;
  }
  .price-quotes-title {
    font-size: 22px;
  }
  .price-item-price {
    font-size: 24px;
  }
}


/* ============================================================
   信息仓库/好友跟进独立卡片样式
   ============================================================ */
.record-card-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.record-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.record-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.record-card-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.record-card-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.record-card-info-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.record-card-info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.record-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.record-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
    padding-top: 8px;
}



/* ============================================================
   信息仓库/好友跟进表格行卡片化样式
   ============================================================ */
table.records-table, table.friend-follow-table {
    border-collapse: separate !important;
    border-spacing: 0 16px !important;
    background: transparent !important;
    min-width: 0 !important;
}

table.records-table thead th, table.friend-follow-table thead th {
    background: transparent !important;
    border-bottom: none !important;
    padding: 8px 16px !important;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table.records-table tbody tr, table.friend-follow-table tbody tr {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    border: 2px solid #e2e8f0 !important;
    transition: all 0.2s ease;
    display: table-row !important;
}

table.records-table tbody tr:hover, table.friend-follow-table tbody tr:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

table.records-table tbody td, table.friend-follow-table tbody td {
    padding: 16px !important;
    border-bottom: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle;
    white-space: normal !important;
}

table.records-table tbody td:first-child, table.friend-follow-table tbody td:first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

table.records-table tbody td:last-child, table.friend-follow-table tbody td:last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

table.records-table tbody tr:first-child td, table.friend-follow-table tbody tr:first-child td {
    border-top: none !important;
}

/* 表格容器去掉内边距，让卡片更舒展 */
.table-wrap:has(.records-table), .table-wrap:has(.friends-table) {
    padding: 8px;
    background: #f8fafc;
}

/* 手机端表格卡片样式 */
@media (max-width: 768px) {
    .records-table, .friends-table {
        border-spacing: 0 8px;
    }
    .records-table tbody td, .friends-table tbody td {
        padding: 12px 8px;
    }
}



/* 统计卡片手机端响应式 */
@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .stat-card {
        padding: 16px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}



/* ============================================================
   报价卡片样式优化 - extra字段固定在底部
   ============================================================ */
.price-item-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.price-item-extra {
    margin-top: auto !important;
    padding-top: 12px !important;
    border-top: 1px dashed #e2e8f0 !important;
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

.price-items-grid {
    align-items: stretch !important;
}



/* 隐藏旧的粗横线分隔行，使用卡片边框代替 */
tr.record-sep {
    display: none !important;
}



/* ============================================================
   强制表格行卡片样式 - 确保浅灰粗边框显示
   ============================================================ */
.card .table-wrap table.records-table,
.card .table-wrap table.friend-follow-table {
    border-collapse: separate !important;
    border-spacing: 0 16px !important;
    background: transparent !important;
}

.card .table-wrap table.records-table tbody tr,
.card .table-wrap table.friend-follow-table tbody tr {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.card .table-wrap table.records-table tbody tr:hover,
.card .table-wrap table.friend-follow-table tbody tr:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

.card .table-wrap table.records-table tbody td,
.card .table-wrap table.friend-follow-table tbody td {
    border: none !important;
    padding: 16px !important;
    vertical-align: middle !important;
}

.card .table-wrap table.records-table tbody td:first-child,
.card .table-wrap table.friend-follow-table tbody td:first-child {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
}

.card .table-wrap table.records-table tbody td:last-child,
.card .table-wrap table.friend-follow-table tbody td:last-child {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

/* 好友跟进页面：每条信息的两行（信息行+跟进信息行）作为一个卡片整体 */
.card .table-wrap table.friend-follow-table tbody tr td[colspan] {
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}



/* ============================================================
   好友跟进表格特殊样式：信息行+跟进信息行作为一个卡片整体
   ============================================================ */
.card .table-wrap table.friend-follow-table {
    border-spacing: 0 0 !important;
}

/* 信息行：顶部圆角、顶部边框、左右边框 */
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row) {
    border-radius: 12px 12px 0 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-bottom: none !important;
    background: #ffffff !important;
}

.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

/* 跟进信息行(.copy-row)：底部圆角、底部边框、左右边框 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row {
    border-radius: 0 0 12px 12px !important;
    border: 2px solid #e2e8f0 !important;
    border-top: 1px dashed #e2e8f0 !important;
    background: #ffffff !important;
    margin-bottom: 16px !important;
}

.card .table-wrap table.friend-follow-table tbody tr.copy-row:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

/* 跟进信息行的单元格 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row td {
    padding: 10px 16px !important;
    border: none !important;
}

/* 两条信息之间的间距：通过最后一行的底部边框实现 */
.card .table-wrap table.friend-follow-table tbody tr:last-child {
    margin-bottom: 0 !important;
}

/* 信息行的单元格 */
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row) td {
    padding: 16px !important;
    border: none !important;
}

/* 信息行第一个和最后一个单元格的圆角 */
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row) td:first-child {
    border-top-left-radius: 10px !important;
}
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row) td:last-child {
    border-top-right-radius: 10px !important;
}

/* 跟进信息行第一个和最后一个单元格的圆角 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row td:first-child {
    border-bottom-left-radius: 10px !important;
}
.card .table-wrap table.friend-follow-table tbody tr.copy-row td:last-child {
    border-bottom-right-radius: 10px !important;
}

/* 使用空行创建两条信息之间的间距 */
.card .table-wrap table.friend-follow-table tbody tr.spacer-row {
    height: 16px !important;
    border: none !important;
    background: transparent !important;
}
.card .table-wrap table.friend-follow-table tbody tr.spacer-row td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}



/* ============================================================
   最终强制卡片样式 - 信息仓库和好友跟进
   使用明显的粗浅灰边框，确保可见
   ============================================================ */

/* 信息仓库表格：每行一个独立卡片 */
table.records-table {
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
    background: transparent !important;
}

table.records-table tbody tr {
    background: #ffffff !important;
    border: 3px solid #94a3b8 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

table.records-table tbody tr:hover {
    border-color: #64748b !important;
    background: #f8fafc !important;
}

table.records-table tbody td {
    border: none !important;
    padding: 14px 16px !important;
    background: transparent !important;
}

table.records-table tbody td:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

table.records-table tbody td:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* 好友跟进表格：信息行+跟进信息行作为一个卡片整体 */
table.friend-follow-table {
    border-collapse: separate !important;
    border-spacing: 0 0 !important;
    background: transparent !important;
}

/* 信息行（第一行）：顶部圆角 + 上左右边框 */
table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) {
    background: #ffffff !important;
    border: 3px solid #94a3b8 !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
}

table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row):hover {
    border-color: #64748b !important;
    background: #f8fafc !important;
}

table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td {
    border: none !important;
    padding: 14px 16px !important;
    background: transparent !important;
}

table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td:first-child {
    border-top-left-radius: 8px !important;
}

table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td:last-child {
    border-top-right-radius: 8px !important;
}

/* 跟进信息行（第二行.copy-row）：底部圆角 + 下左右边框 + 顶部虚线 */
table.friend-follow-table tbody tr.copy-row {
    background: #ffffff !important;
    border: 3px solid #94a3b8 !important;
    border-top: 1px dashed #94a3b8 !important;
    border-radius: 0 0 10px 10px !important;
}

table.friend-follow-table tbody tr.copy-row:hover {
    border-color: #64748b !important;
    background: #f8fafc !important;
}

table.friend-follow-table tbody tr.copy-row td {
    border: none !important;
    padding: 10px 16px !important;
    background: transparent !important;
}

table.friend-follow-table tbody tr.copy-row td:first-child {
    border-bottom-left-radius: 8px !important;
}

table.friend-follow-table tbody tr.copy-row td:last-child {
    border-bottom-right-radius: 8px !important;
}

/* 间距空行 */
table.friend-follow-table tbody tr.spacer-row {
    height: 14px !important;
    border: none !important;
    background: transparent !important;
}

table.friend-follow-table tbody tr.spacer-row td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    height: 14px !important;
}

/* 表头样式 */
table.records-table thead th,
table.friend-follow-table thead th {
    background: transparent !important;
    border-bottom: 2px solid #94a3b8 !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}



/* ============================================================
   简单表格样式 - 恢复分割线，去掉复杂卡片样式
   ============================================================ */

/* 信息仓库表格 - 简单样式 */
table.records-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.records-table thead th {
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 14px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

table.records-table tbody tr {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease !important;
}

table.records-table tbody tr:hover {
    background: #f8fafc !important;
}

table.records-table tbody td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* 好友跟进表格 - 简单样式 */
table.friend-follow-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.friend-follow-table thead th {
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 14px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

table.friend-follow-table tbody tr {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

table.friend-follow-table tbody tr:hover {
    background: #f8fafc !important;
}

table.friend-follow-table tbody td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* 好友跟进的跟进信息行 */
table.friend-follow-table tbody tr.copy-row td {
    padding: 10px 14px !important;
    background: #fafbfc !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-size: 13px !important;
    color: #64748b !important;
}

/* 间距空行隐藏 */
table.friend-follow-table tbody tr.spacer-row {
    display: none !important;
}

/* 表格容器允许横向滚动，确保内容不换行 */
.table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* 确保卡片全宽 */
.card {
    width: 100% !important;
}



/* ============================================================
   最终强制分割线样式 - 确保信息仓库和好友跟进表格有分割线
   覆盖所有之前的border:none样式
   ============================================================ */

/* 信息仓库表格 - 每行底部有分割线 */
.card .table-wrap table.records-table tbody tr td {
    border-bottom: 2px solid #cbd5e1 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    background: #ffffff !important;
}

/* 信息仓库表格 - 最后一行底部没有分割线 */
.card .table-wrap table.records-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 信息仓库表格 - 鼠标悬停 */
.card .table-wrap table.records-table tbody tr:hover td {
    background: #f8fafc !important;
}

/* 好友跟进表格 - 信息行底部有分割线 */
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td {
    border-bottom: 1px dashed #cbd5e1 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    background: #ffffff !important;
}

/* 好友跟进表格 - 跟进信息行底部有较粗的分割线 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row td {
    border-bottom: 3px solid #94a3b8 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    background: #f8fafc !important;
}

/* 好友跟进表格 - 鼠标悬停 */
.card .table-wrap table.friend-follow-table tbody tr:hover td {
    background: #f1f5f9 !important;
}

/* 确保表格边框合并 */
.card .table-wrap table.records-table,
.card .table-wrap table.friend-follow-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

/* 表头样式 */
.card .table-wrap table.records-table thead th,
.card .table-wrap table.friend-follow-table thead th {
    border-bottom: 2px solid #64748b !important;
    background: #f1f5f9 !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}



/* ============================================================
   最终样式：去掉所有卡片效果，只用分割线隔开
   覆盖所有之前的卡片样式（边框、圆角、阴影等）
   ============================================================ */

/* 信息仓库表格 - 纯表格样式，只有分割线 */
.card .table-wrap table.records-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
}

.card .table-wrap table.records-table thead th {
    background: #f8fafc !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.card .table-wrap table.records-table tbody tr {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease !important;
}

.card .table-wrap table.records-table tbody tr:hover {
    background: #f8fafc !important;
}

.card .table-wrap table.records-table tbody td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: transparent !important;
}

.card .table-wrap table.records-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 好友跟进表格 - 纯表格样式，只有分割线 */
.card .table-wrap table.friend-follow-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
}

.card .table-wrap table.friend-follow-table thead th {
    background: #f8fafc !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.card .table-wrap table.friend-follow-table tbody tr {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease !important;
}

.card .table-wrap table.friend-follow-table tbody tr:hover {
    background: #f8fafc !important;
}

.card .table-wrap table.friend-follow-table tbody td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: transparent !important;
}

/* 好友跟进的跟进信息行 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row td {
    padding: 10px 16px !important;
    background: #fafbfc !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-size: 13px !important;
    color: #64748b !important;
}

/* 间距空行隐藏 */
.card .table-wrap table.friend-follow-table tbody tr.spacer-row {
    display: none !important;
}

/* 表格容器 */
.card .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #ffffff !important;
}



/* ============================================================
   最终强制样式：完全去掉每条信息的边框，只保留底部分割线
   ============================================================ */

/* 信息仓库表格 - 完全去掉边框，只保留底部分割线 */
.card .table-wrap table.records-table,
.card .table-wrap table.records-table tbody,
.card .table-wrap table.records-table tbody tr,
.card .table-wrap table.records-table tbody tr td {
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.card .table-wrap table.records-table tbody tr td {
    border-bottom: 1px solid #e2e8f0 !important;
}

.card .table-wrap table.records-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 好友跟进表格 - 完全去掉边框，只保留底部分割线 */
.card .table-wrap table.friend-follow-table,
.card .table-wrap table.friend-follow-table tbody,
.card .table-wrap table.friend-follow-table tbody tr,
.card .table-wrap table.friend-follow-table tbody tr td {
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td {
    border-bottom: 1px solid #e2e8f0 !important;
}

.card .table-wrap table.friend-follow-table tbody tr.copy-row td {
    border-bottom: 2px solid #cbd5e1 !important;
}

/* 表头 - 只保留底边线 */
.card .table-wrap table.records-table thead th,
.card .table-wrap table.friend-follow-table thead th {
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-radius: 0 !important;
}

/* 确保表格边框合并 */
.card .table-wrap table.records-table,
.card .table-wrap table.friend-follow-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}



/* ============================================================
   一次性完全修复：纯表格样式，只有底部分割线
   去掉所有虚线、圆角、边框、阴影、卡片效果
   ============================================================ */

/* ========== 信息仓库表格 ========== */
.card .table-wrap table.records-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.card .table-wrap table.records-table thead th {
    background: #f8fafc !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-radius: 0 !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.card .table-wrap table.records-table tbody tr {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.card .table-wrap table.records-table tbody tr:hover {
    background: #f8fafc !important;
}

.card .table-wrap table.records-table tbody td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 14px 16px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: transparent !important;
}

.card .table-wrap table.records-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ========== 好友跟进表格 ========== */
.card .table-wrap table.friend-follow-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.card .table-wrap table.friend-follow-table thead th {
    background: #f8fafc !important;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-radius: 0 !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.card .table-wrap table.friend-follow-table tbody tr {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.card .table-wrap table.friend-follow-table tbody tr:hover {
    background: #f8fafc !important;
}

/* 信息行：底部1px实线分割线（区分信息行和跟进信息行） */
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 14px 16px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: transparent !important;
}

/* 跟进信息行：浅灰背景 + 底部2px实线分割线（区分不同客户） */
.card .table-wrap table.friend-follow-table tbody tr.copy-row td {
    border: none !important;
    border-bottom: 2px solid #cbd5e1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 10px 16px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: #fafbfc !important;
    font-size: 13px !important;
    color: #64748b !important;
}

/* 间距空行隐藏 */
.card .table-wrap table.friend-follow-table tbody tr.spacer-row {
    display: none !important;
}

/* ========== 表格容器 ========== */
.card .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* 确保所有表格元素都没有边框 */
.card .table-wrap table,
.card .table-wrap table thead,
.card .table-wrap table tbody,
.card .table-wrap table tr,
.card .table-wrap table th,
.card .table-wrap table td {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}



/* ============================================================
   修复操作列分割线错位问题
   确保所有列的单元格高度一致，底部分割线对齐
   ============================================================ */

/* 信息仓库表格 - 确保所有单元格高度一致 */
.card .table-wrap table.records-table tbody tr td {
    vertical-align: middle !important;
    line-height: 1.5 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* 操作列单元格 - 确保和其他列高度一致 */
.card .table-wrap table.records-table tbody tr td.td-actions {
    vertical-align: middle !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    line-height: 1 !important;
}

/* 操作列按钮 - 确保高度一致，没有额外margin */
.card .table-wrap table.records-table tbody tr td.td-actions .btn {
    margin: 0 !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}

/* 操作列表单 - 确保没有额外margin */
.card .table-wrap table.records-table tbody tr td.td-actions form {
    margin: 0 !important;
    display: inline-block !important;
}

/* 好友跟进表格 - 确保所有单元格高度一致 */
.card .table-wrap table.friend-follow-table tbody tr td {
    vertical-align: middle !important;
    line-height: 1.5 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* 好友跟进操作列单元格 */
.card .table-wrap table.friend-follow-table tbody tr td:last-child {
    vertical-align: middle !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    line-height: 1 !important;
}

/* 好友跟进操作列按钮 */
.card .table-wrap table.friend-follow-table tbody tr td:last-child .btn {
    margin: 0 !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}

/* 确保同一行所有单元格底部边框在同一水平线上 */
.card .table-wrap table.records-table tbody tr,
.card .table-wrap table.friend-follow-table tbody tr {
    display: table-row !important;
}

.card .table-wrap table.records-table tbody tr td,
.card .table-wrap table.friend-follow-table tbody tr td {
    display: table-cell !important;
}

/* 手机端确保表格分割线对齐 */
@media (max-width: 768px) {
    .card .table-wrap table.records-table tbody tr td,
    .card .table-wrap table.friend-follow-table tbody tr td {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        vertical-align: middle !important;
    }
    
    .card .table-wrap table.records-table tbody tr td.td-actions .btn,
    .card .table-wrap table.friend-follow-table tbody tr td:last-child .btn {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
}



/* ============================================================
   去掉好友跟进表格鼠标悬停时的动态效果
   ============================================================ */

/* 好友跟进表格 - 鼠标悬停时和正常状态一样，没有任何变化 */
.card .table-wrap table.friend-follow-table tbody tr:hover {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: none !important;
}

.card .table-wrap table.friend-follow-table tbody tr:hover td {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* 好友跟进跟进信息行 - 鼠标悬停时也没有变化 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row:hover {
    background: #fafbfc !important;
}

.card .table-wrap table.friend-follow-table tbody tr.copy-row:hover td {
    background: #fafbfc !important;
    border-bottom: 2px solid #cbd5e1 !important;
}



/* ============================================================
   彻底去掉好友跟进表格鼠标悬停时的放大拉近效果
   确保悬停时没有任何transform、scale、padding变化
   ============================================================ */

/* 好友跟进表格 - 所有行鼠标悬停时完全没有变化 */
.card .table-wrap table.friend-follow-table tbody tr,
.card .table-wrap table.friend-follow-table tbody tr:hover {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    -ms-transition: none !important;
}

/* 好友跟进表格 - 所有单元格鼠标悬停时完全没有变化 */
.card .table-wrap table.friend-follow-table tbody tr td,
.card .table-wrap table.friend-follow-table tbody tr:hover td {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    -ms-transition: none !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* 好友跟进跟进信息行 - 鼠标悬停时完全没有变化 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row,
.card .table-wrap table.friend-follow-table tbody tr.copy-row:hover {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
    transition: none !important;
}

.card .table-wrap table.friend-follow-table tbody tr.copy-row td,
.card .table-wrap table.friend-follow-table tbody tr.copy-row:hover td {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
    transition: none !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* 信息仓库表格 - 也确保没有放大拉近效果 */
.card .table-wrap table.records-table tbody tr,
.card .table-wrap table.records-table tbody tr:hover {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
    transition: none !important;
}

.card .table-wrap table.records-table tbody tr td,
.card .table-wrap table.records-table tbody tr:hover td {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
    transition: none !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* 确保所有表格元素都没有transform效果 */
.card .table-wrap table,
.card .table-wrap table thead,
.card .table-wrap table tbody,
.card .table-wrap table tr,
.card .table-wrap table th,
.card .table-wrap table td {
    transform: none !important;
    scale: none !important;
    zoom: normal !important;
}



/* AI快捷功能按钮样式 */
.ai-quick-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  color: #374151 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  line-height: 1.5 !important;
}
.ai-quick-btn:hover {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}






/* ============================================================
   【最终版】好友跟进表格样式 - 简单可靠，覆盖所有冲突
   ============================================================ */

/* 1. 表格容器：允许内部横向滚动，不影响页面布局 */
.card .table-wrap:has(table.friend-follow-table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
}

/* 2. 表格：边框合并，简单可靠，覆盖所有border-collapse冲突 */
.card .table-wrap table.friend-follow-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
    min-width: 900px !important;
    background: #ffffff !important;
    display: table !important;
}

/* 3. 表头：浅灰背景，底部粗边框 */
.card .table-wrap table.friend-follow-table thead tr {
    display: table-row !important;
}

.card .table-wrap table.friend-follow-table thead th {
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-align: left !important;
    white-space: nowrap !important;
    border-radius: 0 !important;
    display: table-cell !important;
}

/* 4. 信息行（上面那行）：白色背景，底部细分割线 */
.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: table-row !important;
}

.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row):hover {
    background: #f8fafc !important;
}

.card .table-wrap table.friend-follow-table tbody tr:not(.copy-row):not(.spacer-row) td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle !important;
    background: transparent !important;
    white-space: nowrap !important;
    border-radius: 0 !important;
    display: table-cell !important;
}

/* 5. 跟进信息行（下面那行）：浅灰背景，顶部虚线，底部粗分割线 */
.card .table-wrap table.friend-follow-table tbody tr.copy-row {
    background: #f8fafc !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: table-row !important;
}

.card .table-wrap table.friend-follow-table tbody tr.copy-row:hover {
    background: #f1f5f9 !important;
}

.card .table-wrap table.friend-follow-table tbody tr.copy-row td {
    padding: 8px 12px !important;
    border-bottom: 3px solid #e2e8f0 !important;
    border-top: 1px dashed #cbd5e1 !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: table-cell !important;
}

/* 6. 空行隐藏 */
.card .table-wrap table.friend-follow-table tbody tr.spacer-row {
    display: none !important;
}

/* 7. 最后一行去掉底部边框 */
.card .table-wrap table.friend-follow-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 8. 操作列按钮不换行 */
.card .table-wrap table.friend-follow-table .td-actions {
    white-space: nowrap !important;
}

.card .table-wrap table.friend-follow-table .td-actions .btn {
    display: inline-block !important;
    margin: 2px !important;
}

/* 9. AI辅助按钮 */
.card .table-wrap table.friend-follow-table .ai-assist-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #64748b !important;
    cursor: pointer !important;
    border-radius: 6px !important;
}

.card .table-wrap table.friend-follow-table .ai-assist-icon-btn:hover {
    background: #f1f5f9 !important;
    color: #3b82f6 !important;
}

.card .table-wrap table.friend-follow-table .ai-assist-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* 10. 确保表格内的表单元素不会撑破布局 */
.card .table-wrap table.friend-follow-table .inline-form {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.card .table-wrap table.friend-follow-table .business-type-select {
    width: 100px !important;
    max-width: 100px !important;
}

.card .table-wrap table.friend-follow-table .deal-probability-input {
    width: 50px !important;
    max-width: 50px !important;
}




