/* ===== 客户管理工作台 全局样式 =====
   白色为主、品牌红 #C62828 为强调色；
   结论色语义：绿=可报价/成功、黄=需确认、红=不能报价/失败、灰=暂停 */

:root {
  --brand: #C62828;
  --ok: #2e7d32;       /* 绿：可报价 / 导入成功 */
  --warn: #ed6c02;     /* 黄：需确认（公共、疑似重复） */
  --danger: #c62828;   /* 红：不能报价 / 失败（同品牌红） */
  --muted: #9e9e9e;    /* 灰：暂停开发 */
  --text: #262626;
  --text-sub: #8c8c8c;
  --bg: #f7f7f7;
  --border: #e8e8e8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
}

/* ===== 启动加载页 ===== */
.boot-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; background: #fff;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.boot-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 700;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(198, 40, 40, 0.18);
}
.boot-title {
  font-size: 22px; font-weight: 600; color: var(--text); margin: 0 0 6px;
}
.boot-sub {
  font-size: 13px; color: var(--text-sub); margin: 0 0 28px;
}
.boot-spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(198, 40, 40, 0.12);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: boot-spin 0.9s linear infinite;
  margin-bottom: 18px;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
.boot-progress-wrap {
  width: 260px; max-width: 70vw; height: 6px;
  background: #f0f0f0; border-radius: 3px; overflow: hidden;
  margin-bottom: 12px;
}
.boot-progress-bar {
  height: 100%; width: 0%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.25s ease;
}
.boot-status {
  font-size: 13px; color: var(--text-sub); min-height: 20px;
}
.boot-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; text-align: center;
}
.boot-error-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(198, 40, 40, 0.08);
  color: var(--brand); font-size: 28px; line-height: 56px;
  margin-bottom: 16px;
}
.boot-error h2 {
  color: var(--brand); font-size: 20px; font-weight: 600; margin: 0 0 10px;
}
.boot-error p {
  color: var(--text-sub); font-size: 14px; margin: 0 0 8px; max-width: 460px;
}
.boot-error .boot-retry {
  margin-top: 16px;
  padding: 8px 22px; border-radius: 6px; border: none;
  background: var(--brand); color: #fff; font-size: 14px; cursor: pointer;
}
.boot-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; background: #fff;
  color: var(--text-sub); font-size: 14px;
}

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #fdf6f6 0%, #ffffff 55%, #fafafa 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.login-card {
  width: 380px; max-width: 94vw;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 36px 32px;
  box-shadow: 0 8px 30px rgba(198, 40, 40, 0.07);
}
.login-logo {
  text-align: center; margin-bottom: 6px;
}
.login-logo .logo-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  background: var(--brand); margin-right: 8px;
}
.login-title {
  text-align: center; font-size: 21px; font-weight: 600; margin: 0 0 4px;
}
.login-sub {
  text-align: center; color: var(--text-sub); font-size: 13px; margin: 0 0 28px;
}
.brand-btn {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

/* ===== 顶栏 ===== */
.app-header {
  background: #fff;
  border-bottom: 2px solid var(--brand);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 52px;
  position: sticky; top: 0; z-index: 100;
}
.app-header .brand {
  font-size: 17px; font-weight: 600; color: var(--brand);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.app-header .brand .logo-dot {
  width: 11px; height: 11px; border-radius: 3px; background: var(--brand);
  display: inline-block;
}
.app-header .header-right { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.header-user { color: var(--text-sub); font-size: 13px; }

/* 员工端横向菜单 */
.employee-nav { background: #fff; border-bottom: 1px solid var(--border); }
.employee-nav .ant-menu { border-bottom: none; line-height: 46px; }
.employee-nav .ant-menu-item { line-height: 46px; }

/* ===== 员工首页 ===== */
.home-wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 48px; }
.home-hero { text-align: center; margin: 26px 0 10px; }
.home-hero h2 { font-size: 20px; font-weight: 600; margin: 0 0 18px; }
.home-search .ant-input-search .ant-input-lg { font-size: 16px; }
.home-search .ant-input-search .ant-btn { height: 48px; font-size: 16px; }
.home-search .ant-input-affix-wrapper-lg { padding: 8px 14px; }
.home-sub { color: var(--text-sub); font-size: 13px; margin-top: 10px; }
.home-actions { display: flex; gap: 12px; justify-content: center; margin: 22px 0 8px; flex-wrap: wrap; }
.home-entries { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.home-entry-card {
  flex: 1; min-width: 160px; text-align: center; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; padding: 18px 10px;
  transition: all .15s;
}
.home-entry-card:hover { border-color: var(--brand); box-shadow: 0 2px 12px rgba(198,40,40,.08); }
/* 置灰入口：业务员不可查看公共客户 */
.home-entry-card.entry-disabled {
  cursor: not-allowed; background: #fafafa; border-style: dashed; opacity: .72;
}
.home-entry-card.entry-disabled:hover { border-color: var(--border); box-shadow: none; }
.home-entry-card.entry-disabled .entry-num { color: #bbb; }
.home-entry-card.entry-disabled .entry-label { color: #999; }
.home-entry-card .entry-num { font-size: 26px; font-weight: 600; color: var(--brand); }
.home-entry-card .entry-label { color: var(--text-sub); margin-top: 4px; }
.recent-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== 查询结论 ===== */
.conclusion-banner {
  border-radius: 8px; padding: 18px 20px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 12px;
}
.conclusion-banner .cb-icon { font-size: 22px; line-height: 1.2; }
.conclusion-banner .cb-title { font-size: 16px; font-weight: 600; }
.conclusion-banner .cb-text { margin-top: 4px; font-size: 14px; }
.conclusion-banner .cb-extra { margin-top: 8px; font-size: 13px; opacity: .85; }
.cb-NONE      { background: #e8f3e9; color: var(--ok); }
.cb-MINE      { background: #e8f3e9; color: var(--ok); }
.cb-OTHERS    { background: #fbeaea; color: var(--danger); }
.cb-PUBLIC    { background: #fdf1e5; color: var(--warn); }
.cb-SUSPENDED { background: #f0f0f0; color: #616161; }
.cb-SUSPECT   { background: #fdf1e5; color: var(--warn); }

.result-card { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.result-card .rc-name { font-size: 15px; font-weight: 600; }
.result-card .rc-line { color: var(--text-sub); font-size: 13px; margin-top: 3px; }
.rc-badge { font-size: 12px; border-radius: 4px; padding: 1px 8px; color: #fff; display: inline-block; }
.rc-badge-NONE { background: var(--ok); }
.rc-badge-MINE { background: var(--ok); }
.rc-badge-OTHERS { background: var(--danger); }
.rc-badge-PUBLIC { background: var(--warn); }
.rc-badge-SUSPENDED { background: var(--muted); }
.rc-badge-SUSPECT { background: var(--warn); }

/* ===== 通用 ===== */
.page-wrap { padding: 16px; max-width: 1200px; margin: 0 auto; }
.page-title { font-size: 18px; font-weight: 600; margin: 0 0 16px; }
.text-sub { color: var(--text-sub); }
.text-sub-sm { color: var(--text-sub); font-size: 12px; }
.level-tag-A { background: #fdf1e5; color: #d46b08; }
.level-tag-B { background: #e6f4ff; color: #1677ff; }
.level-tag-C { background: #f0f0f0; color: #595959; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }

/* 手机端适配（员工查询场景优先） */
@media (max-width: 640px) {
  .app-header { padding: 0 10px; }
  .app-header .brand { font-size: 15px; }
  .header-user { display: none; }
  .home-hero h2 { font-size: 17px; }
  .page-wrap { padding: 10px; }
  .home-entry-card { min-width: 130px; }
  /* 表格横向滚动 */
  .ant-table-wrapper { overflow-x: auto; }
}
