/* ═══════════════════════════════════════
   盈善律所 · 企微侧边栏 v=17
   移动端优先 · 精致商务风
   ═══════════════════════════════════════ */

/* ── Reset ─────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Roboto, sans-serif;
  background: #eef0f4;
  color: #1d2129;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
#app { width: 100%; }

.page { display: none; }
.page.active { display: block; }
/* 详情页 Flex 滚动布局 */
#detail-page.active {
  display: flex !important;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.tab-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}


/* ═══════════════════════════════════════
   搜索页
   ═══════════════════════════════════════ */

.search-header {
  background: #fff;
  padding: 10px 12px;
  position: sticky; top: 0; z-index: 10;
}
.search-bar {
  display: flex; align-items: center;
  background: #f2f3f5; border-radius: 8px;
  padding: 8px 12px; gap: 6px;
  border: 1px solid transparent;
  transition: border .2s, background .2s;
}
.search-bar:focus-within {
  border-color: #1a3a5c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,58,92,.08);
}

/* 联系人搜索框 - 与搜索页搜索框统一风格 */
#pane-info .search-bar {
  margin: 12px 0 16px;
  border: 1px solid #b8bcbe;
  border-bottom: 2px solid #c8ccce;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}.search-bar .search-icon { font-size: 14px; opacity: .8; flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; background: transparent;
  font-size: 14px; outline: none;
}
.clear-btn { font-size: 12px; color: #bbb; cursor: pointer; padding: 2px; line-height: 1; }

.add-client-btn {
  font-size: 20px; font-weight: 300; color: #1a3a5c; cursor: pointer;
  padding: 0 2px; line-height: 1; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .2s;
  flex-shrink: 0;
}
.add-client-btn:hover { background: #e0e2e6; }
.add-client-btn:active { background: #d0d2d6; }

.search-results { padding: 6px 12px; }

/* ── 空状态 ────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px; margin-top: 24px;
}
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  background: #e8ecf1; border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}

/* ── 信息卡内的条目卡片 ──────────── */
.info-card-body .result-card {
  padding: 10px 12px;
  margin-bottom: 6px;
}
.info-card-body .result-card:last-child {
  margin-bottom: 0;
}
.result-name {
  font-size: 13px; font-weight: 600; color: #1d2129;
  margin-bottom: 3px;
}
.result-detail {
  font-size: 11px; color: #888;
  margin-top: 2px;
  line-height: 1.4;
}
.result-detail .tag {
  display: inline-block;
  background: #eef4fb; color: #1a3a5c;
  font-size: 10px; padding: 0 6px; border-radius: 4px;
  margin-right: 2px; font-weight: 500;
}
.proj-status-ok { color: #52c41a; font-weight: 500; }
.proj-status-warn { color: #faad14; font-weight: 500; }
.priority-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
}
.priority-high { background: #f5222d; }
.priority-medium { background: #faad14; }
.priority-low { background: #d9d9d9; }

/* 添加秒哒数据的 section 标题中的小标签 */
.section-badge {
  display: inline-block;
  background: #eef4fb; color: #1a3a5c;
  font-size: 10px; padding: 0 6px; border-radius: 4px;
  margin-left: 6px; font-weight: 500;
}

.empty-state .title { font-size: 14px; color: #1d2129; font-weight: 500; margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: #aaa; }
.empty-state .desc { font-size: 12px; color: #aaa; }


/* ── 信息卡头部 + 新建按钮 ────────── */
.info-card-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: #1d2129;
  
}
.info-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: #eef4fb; color: #1a3a5c;
  border-radius: 50%;
  font-size: 16px !important; font-weight: 600;
  cursor: pointer; transition: background .15s;
  line-height: 1;
}
.info-add-btn:hover {
  background: #d0e1f7;
}
.info-card-header .count-badge {
  font-size: 11px; color: #999; font-weight: 400; margin-left: 4px;
}

/* ── 时间线式日志卡片 ──────────── */
.log-timeline {
  position: relative;
}
.log-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1a3a5c;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── 搜索结果卡片 ──────────────── */
.result-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid #e8eaed;
  transition: border-color .15s, background .15s;
  position: relative;
}
.result-card:active {
  border-color: #1a3a5c;
  background: #f8faff;
}
.result-card .name { font-size: 14px; font-weight: 600; margin-bottom: 3px; color: #1d2129; }
.result-card .sub { font-size: 12px; color: #666; }
.result-card .badge {
  display: inline-block;
  background: #eef4fb; color: #1a3a5c; font-size: 10px;
  padding: 1px 8px; border-radius: 10px; margin-top: 4px; font-weight: 500;
}
.result-card .arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #ddd; }


/* ═══════════════════════════════════════
   详情页头部
   ═══════════════════════════════════════ */

.detail-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #2b5f96 100%);
  padding: 10px 8px 8px;
  display: flex; align-items: center; gap: 8px;
  position: sticky; top: 0; z-index: 10;
  min-height: 44px;
}
.back-btn {
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
  width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%;
}
.header-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-text { color: #fff; font-size: 14px; font-weight: 600; }
.header-info { flex: 1; min-width: 0; }
.header-name { color: #fff; font-size: 14px; font-weight: 600; }
.header-company { color: rgba(255,255,255,.6); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.header-status {
  background: rgba(255,255,255,.15); color: #fff; font-size: 10px;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
}

/* ═══════════════════════════════════════
   Tab栏
   ═══════════════════════════════════════ */

.tab-bar {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  position: sticky; top: 62px; z-index: 9;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1 0 auto;
  padding: 10px 12px;
  border: none; background: none;
  font-size: 12px; color: #888;
  cursor: pointer; position: relative; white-space: nowrap;
  transition: color .15s;
}
.tab-btn.active { color: #1a3a5c; font-weight: 600; }
.tab-btn.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%;
  width: 60%; height: 2.5px;
  background: linear-gradient(90deg, #1a3a5c, #2b5f96);
  border-radius: 3px 3px 0 0;
}

/* ═══════════════════════════════════════
   内容区
   ═══════════════════════════════════════ */

.tab-content { padding: 8px; background: #eef0f4; min-height: 160px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* 底部安全区（iPhone） */
.tab-content::after { content: ''; display: block; height: 16px; }

/* ═══════════════════════════════════════
   信息卡片
   ═══════════════════════════════════════ */

.info-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 14px 12px;
  margin-bottom: 8px;
}
.info-section-title {
  font-size: 13px; font-weight: 600; color: #1d2129;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 6px;
}
.info-section-title .sec-icon { color: #1a3a5c; font-size: 14px; }
#org-section-title { display: flex; align-items: center; justify-content: space-between; }
.info-grid { display: flex; flex-direction: column; gap: 8px; }
.info-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 4px;
}
.info-label { color: #999; font-size: 11px; flex-shrink: 0; min-width: 60px; }
.info-value { color: #1d2129; font-size: 12px; text-align: right; word-break: break-all; }
.expand-btn {
  text-align: center; color: #1a3a5c; font-size: 12px;
  padding: 8px 0 0; cursor: pointer; font-weight: 500;
}

/* ═══════════════════════════════════════
   可编辑表单
   ═══════════════════════════════════════ */

.edit-section { border-top: 1px solid #f0f0f0; margin-top: 10px; padding-top: 10px; }
.edit-title { font-size: 12px; font-weight: 600; color: #1a3a5c; margin-bottom: 8px; }
.edit-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.edit-row .info-label { min-width: 64px; }
.edit-input {
  flex: 1; padding: 6px 8px; border: 1px solid #e0e2e6; border-radius: 6px;
  font-size: 12px; color: #333; background: #fafafa; outline: none;
  transition: border-color .2s, background .2s;
}
.edit-input:focus { border-color: #1a3a5c; background: #fff; box-shadow: 0 0 0 2px rgba(26,58,92,.08); }
.save-btn {
  width: 100%; margin-top: 10px; padding: 10px;
  background: linear-gradient(135deg, #1a3a5c, #2b5f96);
  color: #fff; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: opacity .15s;
}
.save-btn:active { opacity: .85; }
.save-status { text-align: center; font-size: 11px; margin-top: 4px; padding: 3px; border-radius: 3px; }

/* ═══════════════════════════════════════
   项目卡片
   ═══════════════════════════════════════ */

.case-card {
  background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
  cursor: pointer; border: 1px solid #e8eaed; position: relative;
}
.case-card:active { border-color: #1a3a5c; background: #f8faff; }
.case-card .case-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; color: #1d2129; }
.case-card .case-no { font-size: 11px; color: #999; margin-bottom: 8px; }
.case-card .case-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.case-meta .meta-tag {
  background: #f2f3f5; color: #666; font-size: 10px; padding: 2px 8px; border-radius: 4px;
}
.case-meta .meta-tag.highlight { background: #eef4fb; color: #1a3a5c; }
.case-card .case-progress { display: flex; align-items: center; gap: 6px; }
.progress-bar { flex: 1; height: 4px; background: #eee; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; }
.progress-fill.active { background: #1a3a5c; }
.progress-fill.exec { background: #fa8c16; }
.progress-fill.done { background: #52c41a; }
.progress-text { font-size: 10px; color: #999; }
.case-card .card-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #ddd; }

/* ═══════════════════════════════════════
   状态标签
   ═══════════════════════════════════════ */

.status-tag {
  display: inline-block; font-size: 10px; padding: 2px 8px;
  border-radius: 10px; font-weight: 500;
}
.status-tag.审理中 { background: #eef4fb; color: #1a3a5c; }
.status-tag.执行中 { background: #fef3e2; color: #b46c0a; }
.status-tag.已结案 { background: #f0f0f0; color: #999; }
.status-tag.待立案 { background: #fde8e8; color: #c93535; }
.status-tag.进行中 { background: rgba(255,255,255,.15); color: #fff; }

/* ═══════════════════════════════════════
   日志列表
   ═══════════════════════════════════════ */

.logs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 6px; }
.filter-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex-shrink: 1; min-width: 0; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 4px 10px; border: none; background: #f2f3f5; border-radius: 14px;
  font-size: 11px; color: #666; cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
.filter-btn.active { background: #1a3a5c; color: #fff; }
.add-log-btn {
  background: #1a3a5c; color: #fff; border: none; border-radius: 14px;
  padding: 4px 12px; font-size: 11px; cursor: pointer; flex-shrink: 0;
}

.log-item {
  background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 6px;
  border: 1px solid #f0f0f0;
}
.log-item .log-date { font-size: 11px; color: #bbb; margin-bottom: 3px; }
.log-item .log-user { font-size: 11px; color: #1a3a5c; font-weight: 500; margin-bottom: 4px; }
.log-item .log-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; color: #1d2129; }
.log-item .log-desc { font-size: 12px; color: #666; line-height: 1.5; }
.log-item .log-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }

.log-tag { font-size: 10px; padding: 1px 6px; border-radius: 6px; }
.log-tag.已完成 { background: #e8f5e9; color: #2e7d32; }
.log-tag.沟通记录 { background: #e3f2fd; color: #1565c0; }
.log-tag.待举证 { background: #fff3e0; color: #e65100; }
.log-tag.庭审 { background: #f3e5f5; color: #6a1b9a; }
.log-tag.文书 { background: #fce4ec; color: #ad1457; }
.log-tag.执行 { background: #fbe9e7; color: #bf360c; }

/* ═══════════════════════════════════════
   文件列表
   ═══════════════════════════════════════ */

.file-section { margin-bottom: 10px; }
.file-section-title {
  font-size: 13px; font-weight: 600; color: #333;
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.file-section-title .sec-count { font-size: 10px; color: #bbb; font-weight: 400; }
.upload-btn {
  border: 1px solid #1a3a5c; color: #1a3a5c; border-radius: 14px;
  padding: 2px 10px; font-size: 10px; background: none; cursor: pointer;
  white-space: nowrap; margin-left: auto;
}
.file-item {
  background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #f0f0f0;
}
.file-icon { font-size: 18px; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 12px; font-weight: 500; color: #1d2129; }
.file-meta { font-size: 10px; color: #999; margin-top: 1px; }
.file-link { font-size: 11px; color: #1a3a5c; text-decoration: none; flex-shrink: 0; }

/* 内联搜索框 */
.search-inline, .files-search {
  display: flex; align-items: center;
  background: #f2f3f5; border-radius: 8px;
  padding: 8px 10px; margin-bottom: 8px;
}
.search-inline input, .files-search input {
  flex: 1; border: none; background: transparent;
  font-size: 12px; outline: none; margin-left: 4px;
}
.search-inline .search-icon, .files-search .search-icon { font-size: 12px; opacity: .8; }

/* ═══════════════════════════════════════
   按钮 & 通用
   ═══════════════════════════════════════ */

.add-btn {
  padding: 4px 14px; background: #1a3a5c; color: #fff;
  border: none; border-radius: 14px; font-size: 11px; font-weight: 500;
  cursor: pointer; white-space: nowrap; letter-spacing: .3px;
}
.pane-header { display: flex; align-items: center; gap: 6px; padding: 2px 0 6px; }

/* ═══════════════════════════════════════
   关联企业
   ═══════════════════════════════════════ */

.org-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
  cursor: pointer; position: relative;
}
.org-item:last-child { border-bottom: none; }
.org-avatar {
  width: 28px; height: 28px; border-radius: 6px;
  background: #eef4fb; color: #1a3a5c;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.org-details { flex: 1; min-width: 0; }
.org-name { font-size: 12px; font-weight: 500; margin-bottom: 1px; display: flex; align-items: center; gap: 4px; }
.org-meta { font-size: 10px; color: #999; display: flex; gap: 4px; flex-wrap: wrap; }
.org-code { font-size: 10px; color: #ccc; margin-top: 1px; }
.org-arrow { font-size: 14px; color: #ddd; flex-shrink: 0; }
.org-manual-tag { display: inline-block; font-size: 9px; color: #1a3a5c; background: #eef4fb; padding: 0 4px; border-radius: 2px; }
.org-unlink-btn {
  position: absolute; right: -2px; top: -2px; width: 16px; height: 16px;
  border-radius: 50%; border: none; background: #ff4d4f; color: #fff;
  font-size: 10px; cursor: pointer; display: none; align-items: center;
  justify-content: center; padding: 0; line-height: 1;
}
.org-item:active .org-unlink-btn { display: flex; }
.mini-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #eee; border-top-color: #1a3a5c; border-radius: 50%; animation: spin .8s linear infinite; }

/* ═══════════════════════════════════════
   手动关联弹窗
   ═══════════════════════════════════════ */

.add-org-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border: 1.5px dashed #1a3a5c; border-radius: 50%;
  color: #1a3a5c; font-size: 14px; font-weight: 700; cursor: pointer;
  background: none; line-height: 1; transition: background .15s;
}
.add-org-btn:active { background: #1a3a5c; color: #fff; }
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: #fff; border-radius: 12px; width: 92%; max-width: 340px;
  max-height: 80vh; overflow: hidden; display: flex; flex-direction: column;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 14px; font-weight: 600; color: #1a3a5c; border-bottom: 1px solid #f0f0f0; }
.modal-close { font-size: 18px; cursor: pointer; color: #999; padding: 0 4px; }
.modal-body { padding: 10px 14px; overflow-y: auto; flex: 1; }
.modal-search input { width: 100%; padding: 8px 12px; border: 1px solid #e0e2e6; border-radius: 8px; font-size: 13px; outline: none; }
.modal-results { margin-top: 6px; }
.modal-org-item { display: flex; align-items: center; justify-content: space-between; padding: 8px; border-bottom: 1px solid #f5f5f5; }
.modal-org-info { flex: 1; min-width: 0; }
.modal-org-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-org-meta { font-size: 10px; color: #999; margin-top: 1px; }
.modal-org-link-btn { padding: 4px 12px; background: #1a3a5c; color: #fff; border: none; border-radius: 6px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.modal-org-link-btn:disabled { background: #52c41a; cursor: default; }

\n/* ── 新建客户弹窗 ────────────────── */\n.new-client-form { padding: 4px 0; }\n.new-client-form .bind-form-group { margin-bottom: 16px; }\n.new-client-form .bind-form-group input {\n  width: 100%; padding: 10px 12px; border: 1px solid #e0e2e6; border-radius: 8px;\n  font-size: 14px; outline: none; box-sizing: border-box; transition: border .2s;\n}
.new-client-form .bind-form-group input:focus {\n  border-color: #1a3a5c; box-shadow: 0 0 0 3px rgba(26,58,92,.08);\n}
.form-actions {\n  display: flex; gap: 10px; margin-top: 20px;\n}
.form-actions button {\n  flex: 1; padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 500;\n  border: none; cursor: pointer; transition: opacity .2s;\n}
.form-actions .btn-cancel {\n  background: #f2f3f5; color: #666;\n}
.form-actions .btn-save {\n  background: #1a3a5c; color: #fff;\n}
.form-actions .btn-save:disabled { opacity: .5; cursor: not-allowed; }

/* ═══════════════════════════════════════
   加载 & 错误 & WPS & Toast
   ═══════════════════════════════════════ */

.loading { text-align: center; padding: 32px; color: #999; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2.5px solid #e8eaed; border-top-color: #1a3a5c; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg { text-align: center; padding: 24px; color: #d93025; }
.error-msg .error-icon { font-size: 24px; margin-bottom: 6px; }

.no-results { text-align: center; padding: 20px; color: #bbb; font-size: 12px; }

/* ── 关联系统空状态 ── */
.bind-entry { padding: 40px 20px; }
.bind-entry-card {
  background: #fff; border: 1px solid #e8eaed; border-radius: 16px;
  padding: 36px 20px; text-align: center; cursor: pointer;
  transition: all .25s ease;
}
.bind-entry-card:hover { border-color: #1a3a5c; box-shadow: 0 4px 20px rgba(26,58,92,.12); }
.bind-entry-card:active { transform: scale(.97); }
.bind-entry-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg,#eef2f8,#dce6f0);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 14px;
}
.bind-entry-title { font-size: 17px; font-weight: 600; color: #1a3a5c; margin-bottom: 6px; }
.bind-entry-desc { font-size: 13px; color: #8e9196; line-height: 1.5; }

/* ── 绑定面板（点击后展开） ── */
.bind-panel { display: none; padding: 4px 0; }
.bind-panel.active { display: block; }
.bind-panel-header {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 12px; border-bottom: 1px solid #edeff2; margin-bottom: 14px;
}
.bind-panel-back {
  background: none; border: none; font-size: 22px; color: #1a3a5c;
  cursor: pointer; padding: 2px 6px; line-height: 1;
}
.bind-panel-title { font-size: 16px; font-weight: 600; color: #1a3a5c; }

.bind-container { padding: 0; }

/* ── 微信联系人卡片 ── */
.bind-wechat-card { background: #fff; border: 1px solid #edeff2; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.bind-wechat-header { background: linear-gradient(135deg,#1a3a5c,#2b5f96); padding: 12px 16px; }
.bind-badge { color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.bind-wechat-body { padding: 10px 16px; }
.bind-field { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.bind-field:last-child { border: none; }
.bind-label { color: #8e9196; }
.bind-val { color: #222; font-weight: 500; }

/* ── 绑定区域标题 ── */
.bind-section-title {
  font-size: 14px; font-weight: 600; color: #1a3a5c;
  margin: 14px 0 2px; padding-left: 0;
}
.bind-hint { font-size: 12px; color: #8e9196; margin-bottom: 8px; }

/* ── 匹配项列表 ── */
.bind-match-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #edeff2; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px;
}
.bind-match-item:hover { border-color: #d0d4db; }
.bind-match-info { flex: 1; min-width: 0; }
.bind-match-info strong { font-size: 14px; color: #222; display: block; margin-bottom: 3px; }
.bind-phone { font-size: 11px; color: #8e9196; display: inline-block; margin-right: 10px; }

/* ── 按钮 ── */
.bind-btn {
  border: none; border-radius: 14px; padding: 7px 16px; font-size: 12px;
  cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: all .15s;
}
.bind-btn-primary { background: #1a3a5c; color: #fff; }
.bind-btn-primary:active { background: #0f2640; }
.bind-btn-new {
  background: linear-gradient(135deg,#1a3a5c,#2b5f96); color: #fff;
  width: 100%; padding: 12px; border-radius: 10px; font-size: 14px;
  font-weight: 600; margin-top: 14px; letter-spacing: .5px;
}
.bind-btn-new:active { opacity: .9; }

/* ── 搜索输入（Miaoda风格） ── */
.bind-search-row { margin: 8px 0; }
.bind-search-input {
  width: 100%; padding: 10px 14px; border: 1px solid #e0e3e8;
  border-radius: 10px; font-size: 14px; outline: none;
  background: #f8f9fb; transition: all .2s;
}
.bind-search-input:focus {
  border-color: #1a3a5c; background: #fff;
  box-shadow: 0 0 0 3px rgba(26,58,92,.08);
}
#bind-search-results { margin-top: 4px; }

/* ── 新建客户表单（Miaoda风格） ── */
/* ── 新建客户表单（带分组） ── */
.bind-form-scroll {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bind-form-section {
  font-size: 12px; font-weight: 600; color: #888;
  margin: 18px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
  letter-spacing: 0.5px;
}
.bind-form-section:first-of-type { margin-top: 4px; }
.bind-new-form { margin-top: 8px; }
.bind-form-group { margin-bottom: 14px; }
.bind-form-group label {
  display: block; font-size: 12px; font-weight: 500; color: #555;
  margin-bottom: 4px;
}
.bind-form-group label .opt-hint {
  font-weight: 400; font-size: 11px; color: #aaa; margin-left: 4px;
}
.bind-form-group input, .bind-form-group select, .bind-form-group textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #e0e3e8; border-radius: 8px;
  font-size: 14px; outline: none; background: #fff;
  transition: all .2s;
  box-sizing: border-box;
  font-family: inherit;
}
.bind-form-group select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23999'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
.bind-form-group textarea { min-height: 60px; resize: vertical; }
.bind-form-group input:focus, .bind-form-group select:focus, .bind-form-group textarea:focus {
  border-color: #1a3a5c;
  box-shadow: 0 0 0 3px rgba(26,58,92,.08);
}
.bind-form-group input::placeholder { color: #bbb; font-size: 13px; }

/* ── + 新建按钮（Miaoda风格） ── */
.bind-add-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px; margin-top: 12px;
  border: 1px dashed #d0d4db; border-radius: 10px;
  cursor: pointer; transition: all .2s;
  background: #f8f9fb;
}
.bind-add-row:hover { border-color: #1a3a5c; background: #eef2f8; }
.bind-add-row:active { transform: scale(.98); }
.bind-add-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: #1a3a5c; color: #fff; font-size: 16px; font-weight: 300;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.bind-add-row span:last-child { font-size: 13px; color: #1a3a5c; font-weight: 500; }

/* ── 客户列表箭头 ── */
.bind-arrow { font-size: 18px; color: #bbb; font-weight: 300; }

.toast-msg {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(29,33,41,.92); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 13px;
  z-index: 9999; max-width: 85vw; text-align: center;
  white-space: normal; backdrop-filter: blur(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* ── 转发按钮 ───────────────────── */
.forward-btn {
  font-size: 18px; font-weight: 400; cursor: pointer;
  background: rgba(255,255,255,.2); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0;
  transition: background .2s;
}
.forward-btn:hover { background: rgba(255,255,255,.35); }
.forward-btn:active { background: rgba(255,255,255,.15); }

/* ── 关联按钮 ───────────────────── */
.bind-btn-header {
  font-size: 16px; font-weight: 400; cursor: pointer;
  background: rgba(255,255,255,.2); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.bind-btn-header:hover { background: rgba(255,255,255,.35); }
.bind-btn-header:active { background: rgba(255,255,255,.15); }


/* ── 齿轮编辑按钮 ──────────────────── */
.gear-btn {
  display: inline-block; font-size: 22px; cursor: pointer;
  margin-left: auto; opacity: .7; transition: opacity .2s;
  vertical-align: middle; line-height: 1;
}
.gear-btn:hover { opacity: 1; }

/* 绑定模式下的搜索结果卡片 */
.result-card-bindable {
    cursor: pointer;
    background: #f0f7ff !important;
    border-left: 3px solid #1a73e8 !important;
}
.result-card-bindable:hover {
    background: #e3eeff !important;
}
.result-card-bindable .badge {
    background: #1a73e8 !important;
    color: white !important;
}

/* ═══════════════════════════════════════
   统一统计行
   ═══════════════════════════════════════ */

.stats-line {
  font-size: 11px; color: #999; padding: 0 2px 6px; margin-top: -4px;
}

/* 搜索框+按钮布局：搜索框收缩，按钮固定 */#search-inline-cases, #search-inline-tasks, #search-inline-logs, #search-inline-files {
  flex: 1; min-width: 0; margin-bottom: 0;
}

/* ═══════════════════════════════════════
   统一搜索栏（区别于下方列表）
   ═══════════════════════════════════════ */

.search-bar {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #b8bcbe;
  border-radius: 8px; padding: 8px 10px; margin: 10px 0 14px;
  /* 只靠边框区分与列表区 */
  border-bottom: 2px solid #c8ccce;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.search-bar .search-icon { font-size: 12px; opacity: .7; flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; background: transparent;
  font-size: 12px; outline: none;
}
.search-bar input::placeholder { color: #a0a4ab; }

/* ═══════════════════════════════════════
   统一内容区
   ═══════════════════════════════════════ */

.pane-content {
  min-height: 40px;
}

/* 所有栏目统一的section标题（风格同 file-section-title） */
.section-title {
  font-size: 13px; font-weight: 600; color: #333;
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.section-title .section-add-btn {
  border: 1px solid #1a3a5c; color: #1a3a5c; border-radius: 14px;
  padding: 2px 10px; font-size: 10px; background: none; cursor: pointer;
  white-space: nowrap; margin-left: auto;
}

.file-section-title .section-add-btn {
  border: 1px solid #1a3a5c; color: #1a3a5c; border-radius: 14px;
  padding: 2px 10px; font-size: 10px; background: none; cursor: pointer;
  white-space: nowrap; margin-left: auto;
}

/* 所有栏目统一的条目卡片（风格同 file-item） */
.list-card {
  background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid #e8e8e8; transition: background 0.15s;
}
.list-card:hover { background: #f8f9fa; }
.list-card .card-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.list-card .card-info { flex: 1; min-width: 0; }
.list-card .card-name { font-size: 13px; font-weight: 500; color: #1d2129; }
.list-card .card-meta { font-size: 11px; color: #999; }
.list-card .card-action {
  font-size: 11px; color: #1a3a5c; text-decoration: none; flex-shrink: 0;
}

/* 空状态统一样式 */
.empty-card {
  color: #999; text-align: center; padding: 30px 0; font-size: 13px;
}

/* ═══════════════════════════════════════
   隐藏旧的pane-content里不用的元素
   ═══════════════════════════════════════ */

.stats-line { display: none; }
#pane-logs .filter-tabs, #pane-logs .logs-header { display: none; }


/* ── 案件详情二级视图 ─────────────────────── */
.case-detail-bar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    gap: 8px;
}
.case-detail-bar .back-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #1a3a5c;
    cursor: pointer;
    padding: 4px 8px;
    white-space: nowrap;
}
.case-detail-info {
    flex: 1;
    min-width: 0;
}
.case-detail-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a3a5c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.case-detail-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sub-tab-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 8px;
    gap: 0;
}
.sub-tab-btn {
    flex: 1;
    padding: 10px 4px;
    border: none;
    background: none;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-align: center;
}
.sub-tab-btn.active {
    color: #1a3a5c;
    font-weight: 600;
    border-bottom-color: #1a3a5c;
}
#sub-tab-content {
    position: relative;
}
.sub-tab-pane {
    padding: 12px 14px;
}
.sub-tab-pane .contact-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}
.sub-tab-pane .contact-item .name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.sub-tab-pane .contact-item .role {
    font-size: 12px;
    color: #1890ff;
    background: #e6f7ff;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin: 4px 0;
}
.sub-tab-pane .contact-item .detail {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* 案件卡片 */
.case-card {
    padding: 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin: 0 14px 10px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.case-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.case-card .case-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.case-card .case-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.case-card .case-tags {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.case-card .case-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #666;
}
.case-card .case-tag.type { background: #e6f7ff; color: #1890ff; }
.case-card .case-tag.court { background: #fff7e6; color: #d48806; }
.case-card .case-tag.status { background: #f6ffed; color: #52c41a; }
.case-card .case-tag.status-pending { background: #fff2f0; color: #ff4d4f; }
.case-card .arrow {
    float: right;
    color: #ccc;
    font-size: 16px;
    margin-top: 2px;
}
