/* ============================================
   弱电项目管理系统 - 全局样式（浅色专业风）
   ============================================ */
:root {
  --primary: #2f5cf6;
  --primary-dark: #1e47d8;
  --primary-light: #e8edfe;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1f2937;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e5e7eb;
  --sidebar-w: 232px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}
.hidden { display: none !important; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 16px; height: 36px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; transition: all .15s; white-space: nowrap; background: #fff;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #128a3e; }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.25); color: #cbd5e1; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ============ 表单 ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none; background: #fff; transition: border .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 92, 246, .12);
}
.input[readonly] { background: #f9fafb; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.share-row { grid-template-columns: 1fr 1fr 1fr auto; gap: 0 12px; margin-bottom: 10px; align-items: end; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* 人员多选选择器（负责人/跟进人，强制从员工表选择）
   Element Select 风格：选中项以标签内嵌在输入框内 */
.emp-pick { position: relative; }
.emp-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  min-height: 38px; padding: 3px 8px; cursor: text;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  transition: border .15s, box-shadow .15s;
}
.emp-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 92, 246, .12); }
.emp-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 4px; padding: 1px 6px; font-size: 12.5px; line-height: 1.6; white-space: nowrap;
}
.emp-tag .emp-tag-x { cursor: pointer; font-style: normal; opacity: .55; padding: 0 2px; font-weight: 600; }
.emp-tag .emp-tag-x:hover { opacity: 1; }
.emp-search {
  flex: 1; min-width: 70px; height: 24px; border: none; outline: none; padding: 0 2px;
  font-size: 13.5px; background: transparent; color: var(--text);
}
.emp-search::placeholder { color: var(--text-3); }
.emp-box.has-tags .emp-search::placeholder { color: transparent; }
.emp-drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 220px; overflow: auto; }
.emp-opt { padding: 8px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f3f4f6; }
.emp-opt:last-child { border-bottom: none; }
.emp-opt:hover { background: var(--primary-light); }
.emp-opt.empty { cursor: default; color: var(--text-3); text-align: center; }

/* 产品图片上传 */
.img-upload { display: flex; gap: 16px; align-items: center; }
.img-preview { width: 96px; height: 96px; border: 1px dashed var(--border); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f9fafb; flex: 0 0 auto; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-preview .img-ph { color: var(--text-3); font-size: 13px; }
.img-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.thumb-none { width: 48px; height: 48px; border-radius: 6px; background: #f1f3f7; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }

/* 项目文档上传 */
.doc-upload { display: flex; align-items: center; gap: 10px; }
.doc-upload .doc-file-name { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 登录页 ============ */
.login-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.login-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0b1e3d 0%, #16305e 45%, #2563eb 100%);
}
.login-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.10) 0, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,.07) 0, transparent 35%);
}
.login-card {
  position: relative; z-index: 2; width: 860px; max-width: 92vw; min-height: 460px;
  background: #fff; border-radius: 18px; display: flex; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.login-logo {
  flex: 1.1; padding: 48px; color: #fff; display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(160deg, #1e3a8a, #2563eb 70%, #3b82f6);
}
.login-logo-icon {
  width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; backdrop-filter: blur(4px);
}
.login-logo-text h1 { font-size: 22px; letter-spacing: 1px; }
.login-logo-text p { font-size: 12px; opacity: .75; margin-top: 8px; letter-spacing: .5px; }
.login-form { flex: 1; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 22px; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.login-form .field { margin-top: 16px; }
.login-form .field label {
  display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 500;
}
.login-input {
  position: relative; display: flex; align-items: center;
  transition: box-shadow .2s, border-color .2s;
}
.login-input svg {
  position: absolute; left: 14px; width: 18px; height: 18px;
  color: var(--text-3); pointer-events: none; transition: color .2s;
}
.login-input input {
  width: 100%; height: 46px; padding: 0 14px 0 44px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
  color: var(--text); background: #f8fafc; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-input input::placeholder { color: var(--text-3); }
.login-input input:hover { border-color: #c7d0e0; background: #fff; }
.login-input:focus-within {
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(47, 92, 246, .14);
}
.login-input:focus-within input {
  border-color: var(--primary); background: #fff;
}
.login-input:focus-within svg { color: var(--primary); }
.login-form .btn { height: 46px; margin-top: 18px; font-size: 15px; border-radius: 10px; }
.login-tip { margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-3); }


/* ============ 布局 ============ */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #101d38 0%, #16284d 100%);
  color: #cbd5e1;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, .4);
}
.brand-name b { display: block; color: #fff; font-size: 15px; }
.brand-name span { font-size: 10px; letter-spacing: 1.5px; color: #64748b; }
.menu { flex: 1; padding: 14px 10px; overflow-y: auto; }
.menu a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 3px;
  border-radius: 9px; font-size: 14px; color: #cbd5e1; transition: all .15s;
}
.menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu a.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(47,92,246,.4); }
.mi {
  width: 18px; height: 18px; flex-shrink: 0; display: inline-block;
  background: currentColor; opacity: .95;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.mi-analytics { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20h16M7 20v-6M12 20V6M17 20v-9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20h16M7 20v-6M12 20V6M17 20v-9'/%3E%3C/svg%3E"); }
.mi-customer { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.5 3-5.5 6.5-5.5s6.5 2 6.5 5.5M16 5.6a3.5 3.5 0 0 1 0 6.8M17.5 14.8c2.4.8 4 2.6 4 5.2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.5 3-5.5 6.5-5.5s6.5 2 6.5 5.5M16 5.6a3.5 3.5 0 0 1 0 6.8M17.5 14.8c2.4.8 4 2.6 4 5.2'/%3E%3C/svg%3E"); }
.mi-project { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E"); }
.mi-product { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2 3 7l9 5 9-5zM3 12l9 5 9-5M3 17l9 5 9-5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2 3 7l9 5 9-5zM3 12l9 5 9-5M3 17l9 5 9-5'/%3E%3C/svg%3E"); }
.mi-template { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 4h12M9 12h12M9 20h12'/%3E%3Cpath d='M4 4h.01M4 12h.01M4 20h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 4h12M9 12h12M9 20h12'/%3E%3Cpath d='M4 4h.01M4 12h.01M4 20h.01'/%3E%3C/svg%3E"); }
.mi-quote { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
.mi-contract { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v5h5M9 13h6M9 17h6M9 9h1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v5h5M9 13h6M9 17h6M9 9h1'/%3E%3C/svg%3E"); }
.mi-receipt { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 2v20l2-1.5L8 22l2-1.5L12 22l2-1.5L16 22l2-1.5L20 22V2l-2 1.5L16 2l-2 1.5L12 2l-2 1.5L8 2 6 3.5z'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 2v20l2-1.5L8 22l2-1.5L12 22l2-1.5L16 22l2-1.5L20 22V2l-2 1.5L16 2l-2 1.5L12 2l-2 1.5L8 2 6 3.5z'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }
.mi-commission { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 1v22M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 1v22M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); }
.mi-settings { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.87l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.7 1.7 0 0 0-1.87-.34 1.7 1.7 0 0 0-1.03 1.56V21a2 2 0 1 1-4 0v-.09a1.7 1.7 0 0 0-1.11-1.56 1.7 1.7 0 0 0-1.87.34l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.7 1.7 0 0 0 .34-1.87 1.7 1.7 0 0 0-1.56-1.03H3a2 2 0 1 1 0-4h.09a1.7 1.7 0 0 0 1.56-1.11 1.7 1.7 0 0 0-.34-1.87l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.7 1.7 0 0 0 1.87.34h.09a1.7 1.7 0 0 0 1.03-1.56V3a2 2 0 1 1 4 0v.09a1.7 1.7 0 0 0 1.03 1.56 1.7 1.7 0 0 0 1.87-.34l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.7 1.7 0 0 0-.34 1.87v.09a1.7 1.7 0 0 0 1.56 1.03H21a2 2 0 1 1 0 4h-.09a1.7 1.7 0 0 0-1.56 1.03z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .34 1.87l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.7 1.7 0 0 0-1.87-.34 1.7 1.7 0 0 0-1.03 1.56V21a2 2 0 1 1-4 0v-.09a1.7 1.7 0 0 0-1.11-1.56 1.7 1.7 0 0 0-1.87.34l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.7 1.7 0 0 0 .34-1.87 1.7 1.7 0 0 0-1.56-1.03H3a2 2 0 1 1 0-4h.09a1.7 1.7 0 0 0 1.56-1.11 1.7 1.7 0 0 0-.34-1.87l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.7 1.7 0 0 0 1.87.34h.09a1.7 1.7 0 0 0 1.03-1.56V3a2 2 0 1 1 4 0v.09a1.7 1.7 0 0 0 1.03 1.56 1.7 1.7 0 0 0 1.87-.34l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.7 1.7 0 0 0-.34 1.87v.09a1.7 1.7 0 0 0 1.56 1.03H21a2 2 0 1 1 0 4h-.09a1.7 1.7 0 0 0-1.56 1.03z'/%3E%3C/svg%3E"); }

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; justify-content: space-between; }
.user-mini { display: flex; align-items: center; gap: 10px; }
.logout-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid transparent;
  color: #94a3b8; font-size: 12px; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.logout-btn svg { width: 15px; height: 15px; transition: transform .2s; }
.logout-btn:hover {
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .35);
  color: #fca5a5;
}
.logout-btn:hover svg { transform: translateX(2px); }
.logout-btn:active { transform: scale(.95); }
.user-mini b { display: block; color: #fff; font-size: 13px; }
.user-mini span { font-size: 11px; color: #64748b; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.topbar-left h2 { font-size: 17px; }
.page-sub { font-size: 12px; color: var(--text-3); margin-left: 10px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.global-search input {
  width: 280px; height: 36px; border-radius: 18px; border: 1px solid var(--border);
  padding: 0 16px; font-size: 13px; outline: none; background: var(--bg); transition: all .2s;
}
.global-search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(47,92,246,.1); width: 320px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

.content { flex: 1; overflow-y: auto; padding: 10px; }

/* ============ 卡片 ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 15px; }
.card-body { padding: 18px 20px; }

/* ============ KPI 指标卡 ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi {
  background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: var(--kpi-c, var(--primary)); opacity: .07;
}
.kpi-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0;
  background: var(--kpi-c, var(--primary));
}
.kpi-label { font-size: 13px; color: var(--text-2); }
.kpi-value { font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 2px; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 8px 4px; }
.pager-info { color: var(--text-2); font-size: 13px; margin-right: auto; }
.pager .btn[disabled] { opacity: .45; cursor: not-allowed; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 11px 14px; background: #f8fafc; color: var(--text-2);
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl .ops { text-align: right; white-space: nowrap; }
.tbl .ops .btn { margin-left: 6px; }
.empty { padding: 10px 0; text-align: center; color: var(--text-3); }
.empty .empty-icon { font-size: 42px; margin-bottom: 10px; opacity: .5; }

/* ============ 通用表格辅助（提成等视图） ============ */
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .ops { text-align: right; white-space: nowrap; }
.table .ops .btn { margin-left: 6px; }
.table .strong { font-weight: 600; color: var(--text); }
.muted { color: var(--text-3); }
.text-green { color: #16a34a; }
.text-amber { color: #d97706; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-amber { background: #fef3c7; color: #b45309; }

/* ============ 统计卡片（提成概览） ============ */
.stat-row { display: flex; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 180px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.stat-label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-value.text-green { color: #16a34a; }
.stat-value.text-amber { color: #d97706; }

/* ============ 徽章 ============ */
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; line-height: 1.7; white-space: nowrap;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-cyan { background: #cffafe; color: #0e7490; }

.status { display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.status.s-blue::before { background: #3b82f6; }
.status.s-green::before { background: #22c55e; }
.status.s-amber::before { background: #f59e0b; }
.status.s-red::before { background: #ef4444; }
.status.s-gray::before { background: #94a3b8; }
.status.s-purple::before { background: #a855f7; }
.status.s-cyan::before { background: #06b6d4; }

/* ============ 网格面板 ============ */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-grid .card { min-width: 0; }

/* ============ 工具栏 ============ */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.toolbar .search-input {
  width: 240px; height: 36px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 14px; font-size: 13px; outline: none;
}
.toolbar .search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,92,246,.1); }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px 20px;
  animation: fadeIn .15s;
}
.modal {
  background: #fff; border-radius: 14px; width: 620px; max-width: 100%;
  box-shadow: var(--shadow-lg); animation: slideUp .2s; display: flex; flex-direction: column;
  max-height: 88vh;
}
.modal-lg { width: 860px; }
.modal-xl { width: 1080px; }
.modal-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 16px; }
.modal-close { border: none; background: none; font-size: 20px; color: var(--text-3); cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ 详情内容 ============ */
.detail-head {
  display: flex; align-items: center; gap: 14px; padding: 4px 2px 16px;
  margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.detail-head.split { justify-content: space-between; align-items: flex-start; }
.detail-head .dh-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.detail-head .dh-right { text-align: right; flex: none; padding-top: 2px; }
.detail-head .avatar {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; background: var(--primary);
}
.detail-head .title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.detail-head .sub { margin-top: 3px; color: var(--text-2); font-size: 13px; }
.detail-head .sub .sep { margin: 0 8px; color: var(--border); }

.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin: 18px 2px 10px; display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary);
}

.info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.info-item { background: var(--card); padding: 11px 14px; }
.info-item.full { grid-column: 1 / -1; }
.info-item .label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.info-item .val { font-size: 13.5px; color: var(--text); line-height: 1.5; word-break: break-all; }
.info-item .val.empty { color: var(--text-3); }

.dg-item {
  display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 10px;
  border: none; background: none; border-radius: 8px; font-size: 13px; color: var(--text);
  cursor: pointer; text-align: left; margin-bottom: 2px; transition: all .15s;
}
.dg-item:hover { background: var(--primary-light); }
.dg-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.dg-item .n { font-size: 12px; color: var(--text-3); font-weight: 400; }
.dg-item.active .n { color: var(--primary); }

/* 字典组列表：选中态与操作按钮挂在行容器上 */
.dg-row { display: flex; align-items: center; border-radius: 8px; transition: background .15s; }
.dg-row:hover { background: var(--primary-light); }
.dg-row.active { background: var(--primary-light); }
.dg-row .dg-item { flex: 1; margin-bottom: 0; background: none; }
.dg-row .dg-item:hover { background: none; }
.dg-row.active .dg-item { color: var(--primary); font-weight: 600; }
.dg-row.active .dg-item .n { color: var(--primary); }
.dg-ops { display: flex; gap: 2px; padding-right: 4px; opacity: 0; transition: opacity .15s; }
.dg-row:hover .dg-ops, .dg-row.active .dg-ops { opacity: 1; }
.dg-op { border: none; background: none; cursor: pointer; font-size: 12px; line-height: 1; color: var(--text-3); padding: 3px 5px; border-radius: 5px; }
.dg-op:hover { background: #fff; color: var(--primary); }
.dg-op.danger:hover { background: var(--danger); color: #fff; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab {
  padding: 8px 14px; font-size: 13.5px; color: var(--text-2); cursor: pointer;
  border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.act-list { display: flex; flex-direction: column; gap: 10px; }
.act-item {
  display: flex; gap: 12px; padding: 12px 14px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.act-item .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; margin-top: 6px;
}
.act-item .body { flex: 1; min-width: 0; }
.act-item .meta { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.act-item .meta b { color: var(--text-2); font-weight: 600; }
.act-item .content { font-size: 13.5px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.act-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============ Toast ============ */
#toast-root { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 12px 18px; border-radius: 10px; color: #fff; font-size: 13.5px;
  box-shadow: var(--shadow-lg); animation: slideIn .25s; display: flex; align-items: center; gap: 8px;
  min-width: 200px;
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ 进度条 ============ */
.progress { height: 7px; background: #eef2f7; border-radius: 4px; overflow: hidden; min-width: 70px; }
.progress > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #3b82f6, #60a5fa); transition: width .4s; }
.progress.green > div { background: linear-gradient(90deg, #16a34a, #4ade80); }
.progress.amber > div { background: linear-gradient(90deg, #d97706, #fbbf24); }
.progress.red > div { background: linear-gradient(90deg, #dc2626, #f87171); }

/* ============ 报价引擎（广联达风格工作区） ============ */
.qe-wrap { position: fixed; inset: 0; z-index: 90; background: #eef1f6; display: flex; flex-direction: column; }
.qe-ribbon {
  background: linear-gradient(180deg, #ffffff, #f4f6fa); border-bottom: 1px solid #d5dae2;
  padding: 8px 14px; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.qe-ribbon .group { display: flex; align-items: center; gap: 4px; padding: 0 8px; border-right: 1px solid #e2e6ee; }
.qe-ribbon .group:last-child { border-right: none; }
.qe-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 58px; padding: 4px 0; border-radius: 7px; cursor: pointer; border: none; background: transparent;
  font-size: 11px; color: #374151;
}
.qe-btn:hover { background: #e8edf7; }
.qe-btn .qe-ico { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.qe-btn.danger:hover { background: #fee2e2; color: #b91c1c; }
.qe-ribbon .title { font-weight: 700; font-size: 15px; padding: 0 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.qe-ribbon .title .no { color: #64748b; font-size: 12px; font-weight: 500; }
.qe-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
  font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 2px;
}
.qe-grid input[readonly] { background: #f3f4f6; color: #6b7280; cursor: default; }
.qe-ribbon .spacer { flex: 1; }

.qe-main { flex: 1; display: flex; min-height: 0; }
.qe-tree {
  width: 250px; flex-shrink: 0; background: #fff; border-right: 1px solid #d5dae2;
  display: flex; flex-direction: column; min-height: 0;
}
.qe-tree-head {
  padding: 12px 14px; font-weight: 700; font-size: 13px; color: #374151;
  border-bottom: 1px solid #eef0f4; display: flex; align-items: center; justify-content: space-between;
}
.qe-tree-body { flex: 1; overflow-y: auto; padding: 8px; }
.tree-node { margin-bottom: 2px; }
.tree-row {
  display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 7px;
  cursor: pointer; font-size: 13px; color: #374151;
}
.tree-row:hover { background: #f3f5f9; }
.tree-row.active { background: #e8edfe; color: var(--primary); font-weight: 600; }
.tree-row .arrow { width: 14px; text-align: center; font-size: 10px; color: #9ca3af; transition: transform .15s; }
.tree-row .arrow.open { transform: rotate(90deg); }
.tree-row .t-ico { color: var(--primary); }
.tree-row .count { margin-left: auto; font-size: 11px; color: #9ca3af; }
.tree-node.sub { padding-left: 20px; }
.tree-node.sub .tree-row { padding: 5px 9px; font-size: 12.5px; }
.tree-node.sub .tree-row.active { background: #f0f4ff; }

.qe-grid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.qe-tabs {
  display: flex; background: #f4f6fa; border-bottom: 1px solid #d5dae2; padding: 0 10px; flex-shrink: 0;
}
.qe-tab {
  padding: 10px 16px; font-size: 13px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px;
}
.qe-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.qe-grid-body { flex: 1; overflow: auto; background: #fff; }
.qe-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 1200px; }
.qe-table th {
  position: sticky; top: 0; z-index: 2; background: #f4f6fa; color: #4b5563;
  padding: 8px 10px; border: 1px solid #e5e9f0; font-weight: 600; white-space: nowrap; text-align: right;
}
.qe-table th.left { text-align: left; }
.qe-table td { padding: 5px 8px; border: 1px solid #eef1f5; text-align: right; }
.qe-table td.left { text-align: left; }
.qe-table td input {
  width: 100%; border: 1px solid transparent; background: transparent; text-align: right;
  padding: 4px 6px; font-size: 12.5px; border-radius: 4px; outline: none; color: #1f2937;
}
.qe-table td input.left { text-align: left; }
.qe-table td input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 2px rgba(47,92,246,.12); }
.qe-table td input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.qe-table tr.row-system td { background: #f8fafc; font-weight: 700; }
.qe-table tr.row-system .name { color: var(--primary-dark); }
.qe-table tr.row-sub td { background: #f8fafc; font-weight: 600; }
.qe-table tr.row-item:hover td { background: #fafbff; }
.qe-table .total-cell { font-weight: 700; color: var(--primary-dark); }
.qe-table tr.row-sum td { background: #eef2fb; font-weight: 700; border-top: 2px solid #c7d2fe; }
.qe-statusbar {
  height: 34px; background: #fff; border-top: 1px solid #d5dae2; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 12px; color: #6b7280;
}
.qe-statusbar .sum { font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.qe-statusbar .sum b { font-size: 17px; }

/* 汇总面板 */
.fee-panel { padding: 14px 16px; background: #fff; border-left: 1px solid #d5dae2; width: 250px; flex-shrink: 0; overflow-y: auto; }
.fee-panel h4 { font-size: 13px; color: #6b7280; margin-bottom: 12px; font-weight: 600; }
.fee-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: #374151; border-bottom: 1px dashed #eef1f5; }
.fee-row.total { font-weight: 700; color: var(--primary-dark); font-size: 15px; border-bottom: none; padding-top: 12px; }
.fee-row.total b { font-size: 19px; }
.fee-edit { cursor: pointer; color: var(--primary); border-bottom: 1px dashed var(--primary); }
.fee-edit input { width: 70px; border: 1px solid var(--primary); border-radius: 4px; padding: 2px 6px; text-align: right; }

/* 房型配置 */
.room-types { display: flex; flex-direction: column; gap: 8px; }
.rt-row { display: flex; align-items: center; gap: 10px; }
.rt-row .rt-name { width: 120px; }
.rt-row input { height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; font-size: 13px; outline: none; }
.rt-row input:focus { border-color: var(--primary); }

/* ============ 打印 ============ */
.print-sheet { display: none; }
@media print {
  /* 打印时只保留报价工作区，隐藏登录页/主界面/弹窗/提示等所有其他 body 子元素 */
  body.printing > *:not(.qe-wrap) { display: none !important; }
  body.printing .qe-wrap { position: static; inset: auto; background: #fff; }
  body.printing .qe-ribbon, body.printing .qe-main, body.printing .qe-statusbar { display: none !important; }
  .print-sheet { display: block; width: 100%; }
}

/* ============ 其他 ============ */
.sec-title { font-size: 14px; font-weight: 600; margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; }
.sec-title::before { content: ''; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; background: #f1f5f9; color: #475569; font-size: 12px; margin: 0 4px 4px 0; }
.row-link { color: var(--primary); cursor: pointer; }
.row-link:hover { text-decoration: underline; }
.hint { font-size: 12px; color: var(--text-3); }
.amount-big { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.mb16 { margin-bottom: 16px; }
.mt16 { margin-top: 16px; }
.mt6 { margin-top: 6px; }

/* ============ 经营中心 ============ */
.an-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); margin-bottom: 14px;
}
.an-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-lbl { font-size: 13px; font-weight: 600; color: var(--text-2); margin-right: 2px; }
.an-sep { font-size: 13px; color: var(--text-3); }
.an-date {
  height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--text); background: #fff;
}
.an-date:focus { outline: none; border-color: var(--primary); }
.an-q {
  height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 13px; color: var(--text-2); cursor: pointer; transition: all .15s;
}
.an-q:hover { border-color: var(--primary); color: var(--primary); }
.an-q.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.an-actions { display: flex; gap: 8px; }
.an-range { font-size: 12.5px; color: var(--text-3); margin: 0 2px 12px; }
.an-range b { color: var(--text-2); font-weight: 600; }
.flex { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.wrap-tight { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================
   经营中心 · 经营驾驶舱（原工作台 + 数据分析融合）
   ========================================================== */
/* 核心 KPI */
.wb-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.wb-kpi {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; align-items: flex-start; gap: 14px;
  position: relative; overflow: hidden;
}
.wb-kpi::after {
  content: ''; position: absolute; right: -34px; top: -34px; width: 118px; height: 118px;
  border-radius: 50%; background: var(--kc); opacity: .07;
}
.wb-kpi-ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--kc);
  color: #fff; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.wb-kpi-main { min-width: 0; flex: 1; }
.wb-kpi-label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wb-kpi-val { font-size: 25px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.wb-kpi-val small { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.wb-kpi-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
/* KPI 同比标识 */
.wb-yoy { font-size: 11px; font-style: normal; font-weight: 600; white-space: nowrap; }
.wb-yoy.up { color: #16a34a; }
.wb-yoy.down { color: #dc2626; }
.wb-yoy.flat { color: var(--text-3); font-weight: 400; }
/* 图表下钻 */
.an-bar { cursor: pointer; }
.an-bar:hover { opacity: .82; }
.an-drill-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 2px 14px; font-size: 13px; color: var(--text-2);
}
.an-drill-head b { color: var(--text); font-size: 15px; }

/* 辅助指标 */
.wb-mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 16px; }
.wb-mini {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; position: relative;
}
.wb-mini-dot { position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; }
.wb-mini-label { font-size: 12.5px; color: var(--text-2); }
.wb-mini-val {
  font-size: 21px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.wb-mini-val small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.wb-mini-sub { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.wb-trend { font-size: 11.5px; font-style: normal; font-weight: 600; }
.wb-trend.up { color: #16a34a; }
.wb-trend.down { color: #dc2626; }
.wb-flat { font-size: 11.5px; font-style: normal; color: var(--text-3); }

/* 通用栅格 / 进度条 */
.wb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wb-grid .card { min-width: 0; }
.prog { height: 8px; border-radius: 5px; background: #eef1f6; overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 5px; background: var(--primary); transition: width .4s; }
.prog.sm { height: 6px; }

.wb-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.wb-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }

/* 回款健康 */
.wb-ring-row { display: flex; align-items: center; gap: 18px; }
.wb-ring-side { flex: 1; min-width: 0; }
.wb-ring-item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dashed #eef1f5; font-size: 13px;
}
.wb-ring-item:last-child { border-bottom: none; }
.wb-ring-item span { color: var(--text-2); }
.wb-ring-item b { font-variant-numeric: tabular-nums; font-size: 14px; }
.wb-green { color: #16a34a; }
.wb-amber { color: #d97706; }
.wb-red { color: #dc2626; }

/* 账龄 / 阶段 分桶条 */
.wb-bucket { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.wb-bucket:last-child { margin-bottom: 0; }
.wb-bucket-label { width: 96px; flex: none; color: var(--text-2); font-size: 12.5px; }
.wb-bucket .prog { flex: 1; }
.wb-bucket-val { width: 118px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.wb-bucket-val i { font-style: normal; font-size: 11.5px; color: var(--text-3); margin-left: 5px; }
.wb-bucket-val em { font-style: normal; font-size: 11.5px; color: var(--text-3); margin-left: 6px; }

/* 在建项目进度 */
.wb-proj { padding: 12px 0; border-bottom: 1px dashed #eef1f5; cursor: pointer; }
.wb-proj:first-child { padding-top: 0; }
.wb-proj:last-child { border-bottom: none; padding-bottom: 0; }
.wb-proj:hover .wb-proj-top b { color: var(--primary); }
.wb-proj-top { display: flex; align-items: center; gap: 8px; }
.wb-proj-top b { font-size: 13.5px; transition: color .15s; }
.wb-proj-amt { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.wb-proj-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 7px; font-size: 12px; color: var(--text-2);
}
.wb-dot { color: #d5dae3; }
.wb-risk { color: #dc2626; }

/* 逾期 / 到期 标记 */
.wb-od {
  display: inline-block; padding: 1px 8px; border-radius: 5px;
  background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 600;
}
.wb-soon {
  display: inline-block; padding: 1px 8px; border-radius: 5px;
  background: #fef3c7; color: #b45309; font-size: 12px; font-weight: 600;
}
.wb-dot-red, .wb-dot-amber {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.wb-dot-red { background: #dc2626; }
.wb-dot-amber { background: #f59e0b; }

/* 风险待办 */
.wb-todo {
  display: flex; align-items: center; gap: 8px; position: relative;
  padding: 10px 10px 10px 13px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: background .15s;
}
.wb-todo:hover { background: #f8fafc; }
.wb-todo .wb-mini-dot { left: 0; top: 10px; bottom: 10px; }
.wb-todo b { font-variant-numeric: tabular-nums; }
.wb-go { color: var(--text-3); font-size: 16px; }
.wb-ms {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px dashed #eef1f5; font-size: 12.5px;
}
.wb-ms:last-child { border-bottom: none; }
.wb-ms > div { min-width: 0; }

/* 业绩排行 */
.wb-rank { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eef1f5; }
.wb-rank:last-child { border-bottom: none; }
.wb-rank-no {
  width: 22px; height: 22px; border-radius: 50%; flex: none; background: #f1f5f9; color: var(--text-2);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.wb-rank-no.top { background: #2f5cf6; color: #fff; }
.wb-rank-main { flex: 1; min-width: 0; }
.wb-rank-name { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.wb-rank-num { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.wb-rank-num b { display: block; font-size: 13.5px; }
.wb-rank-num span { font-size: 11.5px; color: var(--text-3); }

/* 业务动态 */
.wb-feed { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef1f5; }
.wb-feed:last-child { border-bottom: none; }
.wb-feed-tag {
  flex: none; width: 34px; text-align: center; padding: 3px 0; border-radius: 5px;
  color: #fff; font-size: 11.5px; font-weight: 500;
}
.wb-feed-main { flex: 1; min-width: 0; }
.wb-feed-main b { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-feed-amt { flex: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 窄屏自适应 */
@media (max-width: 1400px) {
  .wb-mini-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .wb-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .wb-grid { grid-template-columns: 1fr !important; }
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }
