:root {
  /* === 主色降饱和：亮蓝 → 灰蓝 === */
  --primary: #3b5998;
  --primary-dark: #2d4a7a;
  --primary-light: #d9e0ea;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  /* === 侧边栏（用户明确不动，保留企微同款蓝）=== */
  --sidebar-bg: #E1EDFB;             /* P158i 企微同款蓝：侧边栏底色 rgb(225,237,251) */
  --sidebar-active: #3370ff;
  --sidebar-text: #191919;           /* 企微主文字近黑 */
  --sidebar-text-light: #6b778c;
  --sidebar-hover: #eaf2fd;          /* P158i 蓝底上的 hover（比底色略亮） */
  --sidebar-active-bg: #D0E4FC;      /* P158i 选中高亮 rgb(208,228,252) */
  --sidebar-border: #e5e6eb;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --yellow: #ca8a04;
  --yellow-bg: #fef3c7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #2563eb 100%);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.login-bg-decoration {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}

.login-bg-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.35;
  animation: blobFloat 18s ease-in-out infinite;
}
.login-bg-blob-1 { width: 480px; height: 480px; background: #3b82f6; top: -120px; left: -120px; }
.login-bg-blob-2 { width: 380px; height: 380px; background: #06b6d4; bottom: -80px; right: -100px; animation-delay: -6s; }
.login-bg-blob-3 { width: 300px; height: 300px; background: #8b5cf6; top: 40%; left: 60%; animation-delay: -12s; opacity: 0.25; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px 36px 28px;
  width: 420px;
  max-width: 100%;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative; z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-img {
  width: 96px; height: 96px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f5ff 0%, #dbeafe 100%);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}
.login-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.login-logo-fallback { font-size: 48px; line-height: 1; }

.login-brand {
  font-size: 32px !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 0 4px !important;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-brand-en {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 4px;
  font-weight: 600;
  margin-bottom: 16px;
}

.login-slogan {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 12px 0 0;
}
.slogan-line {
  flex: 0 0 32px; height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}
.slogan-text {
  font-size: 13px; color: #475569;
  letter-spacing: 1.5px; font-weight: 500;
}

.login-footer {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed #e2e8f0;
  text-align: center;
  font-size: 11px; color: #94a3b8;
  letter-spacing: 0.5px;
}

.login-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}
.login-tab {
  flex: 1; padding: 10px 0; text-align: center;
  font-size: 14px; font-weight: 500; color: #94a3b8;
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.2s;
}
.login-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 12px; color: #cbd5e1; font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.login-tab-content { margin-bottom: 12px; }

.login-card .form-group {
  margin-bottom: 20px;
}

.login-card input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.login-card input:focus {
  outline: none;
  border-color: var(--primary);
}

.login-hint {
  margin-top: 20px;
  padding: 12px;
  background: var(--primary-light);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.8;
}

.login-hint strong {
  color: var(--primary);
}

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

.sidebar {
  width: 208px;                                  /* P158h：188→208 再加宽，「河南启新家装饰工程有限公司」13字徽章完整显示 */
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
}

/* P158f 顶部品牌区=企微「账户区」：浅灰底 + 下分隔线；logo 左 + 名称/标语右 */
.sidebar-header {
  padding: 14px 12px 12px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid var(--sidebar-border);
  box-shadow: none;
}

.sidebar-header::after { content: none; }

.sidebar-brand {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 8px;
  justify-content: flex-start;
}

.sidebar-logo {
  width: 36px; height: 36px;
  background: #ffffff;
  border-radius: 8px;
  padding: 1px;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--sidebar-border);
  box-shadow: none;
}

.sidebar-brand-text {
  display: flex; flex-direction: column;
  gap: 2px;
  min-width: 0;
  align-items: center;                            /* P158j：品牌名居中于标语上方 */
}

.sidebar-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #191919;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.sidebar-brand-slogan {
  font-size: 10px;
  color: var(--sidebar-text-light);
  letter-spacing: 0;
  margin-top: 0;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-header .tenant-badge {
  margin-top: 2px;
  font-size: 11px;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 5px 8px;
  background: #eef0f3;
  border-radius: 6px;
  border: 1px solid var(--sidebar-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 平台管理员看到的「🌐 平台总后台」徽章——金色提示保留以强调身份 */
.sidebar-header .tenant-badge-editable {
  cursor: pointer;
  position: relative;
  transition: background .15s;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.sidebar-header .tenant-badge-editable:hover {
  background: #fde68a;
}
.sidebar-header .tenant-badge .nav-edit-badge {
  font-size: 11px;
  opacity: .55;
}
.sidebar-header .tenant-badge-editable:hover .nav-edit-badge { opacity: 1; }

/* 平台端查看租户时的顶部 banner */
.tenant-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
  border: 1px solid #ffd591;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #874d00;
}
.tenant-context-banner .tcb-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.tenant-context-banner .tcb-icon { font-size: 18px; }
.tenant-context-banner strong { color: #ad4e00; }

/* 「进入装修公司操作」激活态 banner（更醒目，蓝紫色调区分只读模式） */
.tenant-context-banner.tenant-context-active {
  background: linear-gradient(135deg, #eef4ff 0%, #e0eaff 100%);
  border-color: #a8c3ff;
  color: #1e3a8a;
}
.tenant-context-banner.tenant-context-active strong { color: #1e6fff; }
.tenant-context-banner .tcb-exit {
  border: 1px solid #1e6fff;
  background: #1e6fff;
  color: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.tenant-context-banner .tcb-exit:hover { background: #0f5be0; border-color: #0f5be0; }

/* 侧边栏「退出公司视角」按钮 */
.sidebar-footer-btns .btn-exit-tenant {
  background: #fff7ed;                             /* P62 改：白透明 → 浅橙 */
  border: 1px solid #fed7aa;                       /* P62 改：白透明 → 浅橙实线 */
  color: #c2410c;                                  /* P62 改：白 → 深橙 */
  border-radius: 6px;
  padding: 6px 12px;                               /* P62 改：5×10 → 6×12 */
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.sidebar-footer-btns .btn-exit-tenant:hover {
  background: #ffedd5;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;                                 /* P62 改：12→10（与下方 padding 协调） */
  overflow-y: auto;
}

/* P158f：导航项=企微规格——高约36px、14px 近黑文字、浅蓝圆角胶囊选中（去掉左侧蓝条） */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1px 6px;
  padding: 8px 8px 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 400;
}

/* hover 浅灰底，文字保持近黑 */
.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

/* 选中=浅蓝胶囊 + 蓝字（企微式） */
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 500;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 17px;
}
.nav-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 10px;
  padding: 0 5px;
  min-width: 16px;
  line-height: 16px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

/* P158f 底部用户区=企微「我的企业」区：同底浅灰 + 上分隔线 */
.sidebar-footer {
  padding: 8px 10px;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  box-shadow: none;
}

/* ===== P62 企微风格：用户信息 ===== */
.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 2px;
  background: transparent;
  border: none;
}
.sidebar-footer .user-info:hover {
  background: var(--sidebar-hover);
}
.user-info-arrow {
  margin-left: auto;
  color: var(--sidebar-text-light);
  font-size: 11px;
}
.user-info-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  color: #191919;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10.5px;
  color: var(--sidebar-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 头部菜单（原来挤在底部的 4 个按钮） */
.sidebar-footer-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 8px;
  background: #ffffff;                             /* P62 改：白透明 → 纯白 */
  border-radius: 8px;
  border: 1px solid var(--sidebar-border);         /* P62 改：白透明 → 浅灰 */
}

.sidebar-footer-btns .btn-sm,
.sidebar-footer-btns .logout-btn {
  width: 100%;
  text-align: left;
  background: transparent !important;
  border: none;
  color: #4b5563;                                  /* P62 改：#cbd5e1 → #4b5563 深灰 */
  padding: 9px 12px;                               /* P62 改：8×10 → 9×12 略大 */
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all .15s;
}
.sidebar-footer-btns .btn-sm:hover,
.sidebar-footer-btns .logout-btn:hover {
  background: #f3f4f6 !important;                  /* P62 改：白透明 → 浅灰 */
  color: #1f2937;
}
.sidebar-footer-btns .btn-exit-tenant {
  color: #fb923c !important;
  background: rgba(251, 146, 60, 0.1) !important;
  border: 1px solid rgba(251, 146, 60, 0.25);
  font-weight: 500;
}
.sidebar-footer-btns .btn-exit-tenant:hover {
  background: rgba(251, 146, 60, 0.2) !important;
}

.main-content {
  flex: 1;
  min-width: 0;                                    /* P191：flex 子项默认 min-width:auto，会被内部内容的最小宽度顶住
                                                      无法收缩（小启智享生态中心的横向 tab 条 + 租户表最小宽度约 1325px），
                                                      表现为整页横向滚动条、右侧内容被切。设 0 后由 flex 决定宽度。 */
  margin-left: 208px;                              /* P158h：与新侧栏宽度一致 */
  padding: 28px 32px;
  background: var(--bg);                           /* P62 显式声明：浅灰主区域，与侧栏白底区分 */
}

/* ===== 通用组件 ===== */
.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-desc {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 24px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  padding: 9px 22px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  padding: 9px 22px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: #f0f6ff;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.yellow { background: var(--yellow-bg); color: var(--yellow); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-light);
}

/* ===== 预警概览 ===== */
.warning-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.warning-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.warning-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.warning-card-title {
  font-size: 15px;
  font-weight: 600;
}

.warning-levels {
  display: flex;
  gap: 12px;
}

.warning-level {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 8px;
}

.warning-level.red { background: var(--red-bg); }
.warning-level.yellow { background: var(--yellow-bg); }
.warning-level.green { background: var(--green-bg); }

.warning-level .count {
  font-size: 24px;
  font-weight: 700;
  display: block;
}

.warning-level .label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.warning-level.red .count { color: var(--red); }
.warning-level.yellow .count { color: var(--yellow); }
.warning-level.green .count { color: var(--green); }

/* ===== 表格 ===== */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  font-size: 12.5px;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:hover td {
  background: #f8fafc;
}

/* ===== 标签/徽章 ===== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-red { background: var(--red-bg); color: var(--red); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: #f1f5f9; color: var(--text-light); }

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.tag-construction { background: #e0f2fe; color: #0369a1; }
.tag-material { background: #fef3c7; color: #92400e; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-gray { background: #f1f5f9; color: #64748b; }
.tag-purple { background: #f3e8ff; color: #7c3aed; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* 弹窗内按钮更大气 */
.modal-actions .btn,
.modal-footer .btn {
  padding: 10px 22px;
  font-size: 14px;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  background: var(--bg-2, #f1f5f9);
  font-weight: 700;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
  background: var(--bg-2, #f8fafc);
}

/* ===== 进度条 ===== */
.progress-bar {
  width: 100px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-bar-fill.green { background: var(--green); }
.progress-bar-fill.yellow { background: var(--yellow); }
.progress-bar-fill.red { background: var(--red); }

/* ===== 进度分项卡片 ===== */
.category-section {
  transition: box-shadow 0.2s;
}
.category-section:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.category-card-header:hover {
  background: var(--border) !important;
}
.category-body {
  background: var(--card-bg);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fadeIn .15s ease;
}

/* P23: 全屏态（点击 ⛶ 按钮触发） */
.modal-overlay.maximized {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.modal-overlay.maximized .modal {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

/* 全屏按钮（hover 高亮） */
.modal-maximize {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .12s, color .12s, transform .15s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.modal-maximize:hover { background: var(--primary-light); color: var(--primary); transform: scale(1.08); }
.modal-maximize .maximized-icon::before { content: '⛶'; }
.modal-overlay.maximized ~ * .modal-maximize .maximized-icon::before,
.modal-overlay.maximized .modal-maximize .maximized-icon::before { content: '🗗'; }

.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { transform: translateY(-8px) scale(.985); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal.large {
  max-width: 860px;
}

.modal.xlarge {
  max-width: 1040px;
}

.modal.xxlarge {
  max-width: 1280px;
}

.modal.full {
  max-width: 1400px;
}

.modal-header {
  padding: 20px 28px 18px;       /* P79b 改：18→20/16→18，更宽厚 */
  border-bottom: none;            /* P79b 改：去掉分割线（实色底自带视觉分割） */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);  /* P79b 改：主色蓝实色渐变，醒目标题 */
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);  /* P79b 新增：底部蓝阴影 */
}
/* P79b 移除原 ::before 蓝条（实色底已足够醒目） */
/* P79b 改：直接文本用白色加粗，无 h3 的 modal 也能应用（如"添加成员"） */
.modal-header { color: #ffffff; font-weight: 700; font-size: 20px; letter-spacing: 0.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

.modal-header h3 {
  font-size: 20px;       /* P79b 改：19→20px */
  font-weight: 700;
  margin: 0;
  color: #ffffff;        /* P79b 改：主色蓝 → 白色 */
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);  /* P79b 新增：微阴影提升层次 */
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);  /* P79b 改：主色蓝 → 半透白色（配蓝底） */
  opacity: 1;                         /* P79b 改：直接用 color 半透明，去掉 opacity 避免叠加 */
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .12s, color .12s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.18);  /* P79b 改：白色半透 hover */
  color: #ffffff;
}

.modal-body {
  padding: 22px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  font-size: 14px;
  background: #ffffff !important;
  position: relative;
  z-index: 1;
}

.modal-footer {
  padding: 14px 28px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #fafbfc 0%, #f5f7fa 100%);
  border-radius: 0 0 12px 12px;
}
.modal-overlay.maximized .modal-footer { border-radius: 0; }

/* ===== 兼容老式 inline 弹窗自动美化 ===== */
/* .modal 内直接放的 h3 自动变成 header（撑底 padding + 分隔线） */
.modal > h3:first-child {
  padding: 22px 28px 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* .modal 内除 header/footer/style 之外的所有直接子元素自动给水平 padding */
.modal > *:not(.modal-header):not(.modal-footer):not(style):not(.modal-actions) {
  padding-left: 28px;
  padding-right: 28px;
}
.modal > *:not(.modal-header):not(.modal-footer):not(style):not(.modal-actions):first-of-type {
  padding-top: 24px;
}
.modal > *:not(.modal-header):not(.modal-footer):not(style):not(.modal-actions):last-of-type {
  padding-bottom: 24px;
}

/* 在 h3 后面的 close 按钮（直接挂在 h3 里）自动右贴 */
.modal > h3:first-child > .modal-close {
  margin-left: auto;
  order: 1;
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;                /* P79d 改：600→700 最粗 */
  font-size: 15px;                 /* P79d 改：14→15px 更大 */
  color: #000000 !important;        /* P79d 改：#0f172a→纯黑 + !important 强制覆盖任何冲突 */
  letter-spacing: 0.3px;
  -webkit-text-fill-color: #000000 !important; /* P79d 新增：防 Chrome dark mode / 浏览器扩展强制改色；P79e 加 !important */
  background: #ffffff !important;   /* P79e 新增：实色白底防"透明感"——这是用户原话要求的核心 */
  padding: 6px 12px !important;    /* P79e 新增：让背景"立起来"成小标签块 */
  border-left: 4px solid #2563eb !important; /* P79e 新增：蓝色装饰边 */
  border-radius: 0 6px 6px 0 !important;       /* P79e 新增：右边圆角 */
  background-image: none !important;            /* P79e 新增：阻止任何渐变覆盖 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);       /* P79e 新增：微妙阴影让"贴"在白色卡上 */
}

.form-label .req { color: var(--red) !important; }  /* P79d 改：加 !important */

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;                  /* P79c 新增：input 文字色强制深色（避免继承 .form-label 后看起来还淡） */
  background: #ffffff;             /* P79c 新增：明确白底（避免某些 input 默认透明） */
  transition: border-color 0.15s;
  font-family: inherit;
}

.form-control::placeholder {       /* P79c 新增：placeholder 灰色但够清晰 */
  color: #94a3b8;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* P79d 兜底：所有 modal 内 label 都加深 + 加粗 + 防 Chrome dark reader / 浏览器扩展 */
/* P79e 加强：再加 background 实色白底 + 蓝边 + padding，让标签"贴"在白色卡片上，绝不透明 */
.modal label,
.modal-body label,
.modal-overlay label {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background: #ffffff !important;
  background-image: none !important;
  padding: 4px 10px !important;
  border-left: 3px solid #2563eb !important;
  border-radius: 0 4px 4px 0 !important;
  margin-bottom: 6px !important;
  font-weight: 600 !important;
}

select.form-control {
  background: white;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 14px;
}

/* ===== 派单详情 ===== */
.dispatch-detail .detail-section {
  margin-bottom: 24px;
}

.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-item {
  font-size: 13px;
}

.info-item .info-label {
  color: var(--text-light);
  margin-bottom: 2px;
}

.info-item .info-value {
  font-weight: 500;
}

/* 审核流程时间线 */
.timeline {
  padding-left: 0;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 24px;
  position: relative;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot.pending { background: #f1f5f9; color: var(--text-light); }
.timeline-dot.approved { background: var(--green-bg); color: var(--green); }
.timeline-dot.rejected { background: var(--red-bg); color: var(--red); }

.timeline-content {
  flex: 1;
  padding-top: 4px;
}

.timeline-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.timeline-meta {
  font-size: 12px;
  color: var(--text-light);
}

.timeline-comment {
  margin-top: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
}

/* 关联信息卡片 */
.linked-card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  border-left: 3px solid var(--primary);
  margin-bottom: 12px;
}

.linked-card .linked-type {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.linked-card .linked-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.linked-card .linked-detail {
  font-size: 13px;
  color: var(--text-light);
}

/* 加载状态 */
.loading-view {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 16px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

/* 响应式 */
@media (max-width: 1024px) {
  .warning-overview { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

/* Toast */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.info { background: var(--primary); }
.toast.warning { background: #f59e0b; color: #fff; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 选择器 */
.project-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.project-selector select {
  min-width: 280px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar select, .filter-bar input {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.filter-bar select:focus, .filter-bar input:focus {
  outline: none;
  border-color: var(--primary);
}
.empty-cell { text-align:center;padding:32px 16px;color:var(--text-light);font-size:14px; }

/* ===== 派单明细表格 ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.table-wrap .table { margin: 0; }
.items-table .di-input { padding: 6px 8px; font-size: 13px; min-width: 60px; }
.items-table .di-num { text-align: right; }
.items-table tfoot td { background: #f8fafc; }
.di-seq { text-align: center; color: var(--text-light); font-size: 13px; }

/* ===== 图片上传/插入组件 ===== */
.img-picker {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: #fafbfd;
}
.img-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.img-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.img-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-del:hover { background: var(--red); }
.img-add {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1.5px dashed #b9c6e8;
  background: #fff;
  color: var(--primary);
  font-size: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all .2s;
}
.img-add small { font-size: 11px; margin-top: 2px; }
.img-add:hover { border-color: var(--primary); background: #f0f5ff; }

/* ==================== 素材库选择器 ==================== */
.ap-item {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: all .15s;
  text-align: center;
  padding-bottom: 6px;
}
.ap-item:hover { border-color: #b5d4f4; box-shadow: 0 2px 8px rgba(30,111,255,.08); }
.ap-item.ap-selected { border-color: var(--primary); background: #f0f7ff; }
.ap-thumb { width: 100%; height: 84px; background: #f5f7fa; overflow: hidden; }
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-name { font-size: 12px; color: var(--text); margin-top: 5px; padding: 0 4px; font-weight: 500; }
.ap-meta { font-size: 11px; color: var(--text-light); padding: 0 4px; }
.ap-del {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.45); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ap-del:hover { background: var(--red); }
.ap-check {
  position: absolute; top: 4px; left: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* ==================== 材料库（商品库） ==================== */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.prod-card {
  background: #fff;
  border: 1px solid #eaedf2;
  border-radius: 12px;
  overflow: hidden;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.prod-card:hover {
  box-shadow: 0 10px 28px rgba(26,115,232,.12);
  transform: translateY(-3px);
  border-color: #c4d8f5;
}
.prod-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9eef5 100%);
  overflow: hidden;
}
.prod-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.prod-card:hover .prod-card-img img { transform: scale(1.04); }
.prod-card-img .prod-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; color: #c8d0db;
}
.prod-badge-platform {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, #1a73e8, #4a8cf7);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 12px;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(26,115,232,.3);
}
.prod-badge-own {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, #52c41a, #73d13d);
  color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 12px;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(82,196,26,.3);
}
.prod-badge-off {
  position: absolute; top: 10px; right: 10px;
  background: rgba(150,150,150,.9); color: #fff;
  font-size: 11px; padding: 4px 10px; border-radius: 12px;
  font-weight: 600;
}
.prod-badge-source {
  position: absolute; top: 10px; right: 10px;
  background: rgba(82,196,26,.85); color: #fff;
  font-size: 11px; padding: 4px 10px; border-radius: 12px;
  font-weight: 600;
}

/* 卡内主体 */
.prod-card-body {
  padding: 18px 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prod-brand {
  font-size: 12px;
  color: #8c8c8c;
  display: flex; align-items: center;
  letter-spacing: .3px;
}
.prod-brand::before {
  content: '◇';
  margin-right: 5px;
  color: #c8d0db;
  font-size: 10px;
}
.prod-name {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}
.prod-spec {
  font-size: 12px;
  color: #6b7280;
  background: #f5f7fa;
  padding: 3px 10px;
  border-radius: 4px;
  align-self: flex-start;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-price-row {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-top: 1px dashed #eef0f4;
}
.prod-price {
  color: #e23a3a;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.5px;
}
.prod-price.free { color: #aaa; font-size: 16px; font-weight: 500; }
.prod-unit {
  font-size: 13px;
  color: #8c8c8c;
}
.prod-stock-tag {
  margin-left: auto;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.prod-stock-tag.ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.prod-stock-tag.low { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.prod-stock-tag.none { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* 操作区：单独一行，大按钮 */
.prod-card-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid #f0f2f5;
  background: #fafbfc;
}
.prod-card-actions button {
  flex: 1;
  font-size: 13px;
  padding: 9px 0;
  border-radius: 8px;
  font-weight: 500;
  transition: all .15s;
}
.prod-card-actions button.btn-sm { padding: 9px 0; }
.prod-card-actions .prod-link {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px;
}
.prod-card-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  flex: 1;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  color: #555;
  transition: all .15s;
}
.prod-card-actions label:hover {
  border-color: #1a73e8;
  color: #1a73e8;
}
.prod-card-actions label input { width: 16px; height: 16px; cursor: pointer; margin: 0; }

/* 卡片占满时给 grid 一个空状态美化 */
.prod-grid .empty-state {
  grid-column: 1 / -1;
  background: #fff;
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  padding: 60px 20px;
  color: #8c8c8c;
  text-align: center;
}
.prod-grid .empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: .6; }

/* catalog Tab 多选卡：选中高亮 */
.prod-card.prod-added { opacity: .65; }
.prod-card.prod-selected {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26,115,232,.2);
}

/* 商品分类管理弹窗 */
.prod-cat-list {
  max-height: 320px; overflow-y: auto;
  border: 1px solid #eee; border-radius: 8px;
}
.prod-cat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid #f0f0f0;
}
.prod-cat-row:last-child { border-bottom: none; }
.prod-cat-row .cat-icon { font-size: 20px; }
.prod-cat-row .cat-name { flex: 1; font-weight: 500; }
.prod-cat-row .cat-count { font-size: 12px; color: var(--text-light); }

/* 平台/租户提示条 */
.prod-scope-tip {
  background: #f0f5ff; border: 1px solid #d4e3ff;
  border-radius: 6px; padding: 8px 12px; margin-bottom: 12px;
  font-size: 12px; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
.prod-scope-tip.platform { background: #f0f5ff; border-color: #d4e3ff; color: var(--primary); }
.prod-scope-tip.own { background: #f6ffed; border-color: #d9f7be; color: #52c41a; }

/* 工具栏：scope切换 */
.prod-scope-tabs {
  display: inline-flex; border: 1px solid #d9d9d9; border-radius: 6px; overflow: hidden;
}
.prod-scope-tabs button {
  padding: 5px 14px; border: none; background: #fff;
  font-size: 13px; cursor: pointer; transition: all .15s;
  border-right: 1px solid #d9d9d9;
}
.prod-scope-tabs button:last-child { border-right: none; }
.prod-scope-tabs button.active { background: var(--primary); color: #fff; }

/* ==================== 报价单 ==================== */
.quote-list { display: flex; flex-direction: column; gap: 12px; }
.quote-card {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 10px;
  padding: 14px 16px; cursor: pointer; transition: all .15s;
}
.quote-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); border-color: #b5d4f4; }
.quote-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quote-title { font-weight: 600; font-size: 15px; }
.quote-status {
  font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.quote-status-draft { background: #f0f0f0; color: #666; }
.quote-status-sent { background: #e3f2fd; color: #1976d2; }
.quote-status-viewed { background: #e8f5e9; color: #2e7d32; }
.quote-status-expired { background: #ffebee; color: #c62828; }
.quote-card-body {
  display: flex; gap: 16px; font-size: 12px; color: var(--text-light);
  flex-wrap: wrap;
}
.quote-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid #f0f0f0;
}
/* P90：金额配色改为深灰（已发送）/橙色（草稿），移除刺眼大红色 */
.quote-amount { font-size: 18px; font-weight: 600; color: #1D2129; }
.quote-actions { display: flex; gap: 6px; }

/* 报价单弹窗：基础信息 Tab 中"立即生效"的标识 */
.qet-pane { display: block; }
.qet-pane[data-pane].active { display: block; }
/* P23: 全屏态下取消内部 max-height，让 modal-body 撑满 */
.modal-overlay.maximized .quote-modal-body { max-height: none !important; }
.quote-modal-body { scroll-behavior: smooth; }
.quote-modal .form-section-title {
  font-weight: 600; font-size: 15px; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
  color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
/* 报价单弹窗 - 表单网格（自适应布局：全屏 4 列 / 普通 2 列 / 手机 1 列） */
.quote-modal,
.quote-modal.modal-content,
.modal-content.quote-modal {
  background: #ffffff !important;
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.18) !important;
}
.quote-modal {
  max-width: 880px !important;
}
/* 全屏态：4 列宽舒布局 */
.modal-overlay.maximized .quote-modal,
.modal-overlay.maximized .quote-modal.modal-content,
.modal-overlay.maximized .modal-content.quote-modal {
  max-width: 100vw !important;
  width: 100vw !important;
  border-radius: 0 !important;
}
/* 非全屏态：大屏自适应 3 列，中屏 2 列，小屏 1 列 */
@media (min-width: 1280px) {
  .quote-modal { max-width: 1180px !important; }
  .quote-modal .form-grid { grid-template-columns: 1fr 1fr 1fr !important; }
}
.quote-modal .form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  margin-bottom: 12px !important;
  background: transparent !important;
  align-items: start;
}
.quote-modal .form-grid > label {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  font-size: 13px !important;
  color: #555 !important;
  margin: 0 !important;
  background: transparent !important;
}
.quote-modal .form-grid > label > input,
.quote-modal .form-grid > label > textarea,
.quote-modal .form-grid > label > select {
  width: 100% !important;
  padding: 8px 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  color: #222 !important;
  transition: border-color .15s, box-shadow .15s !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.quote-modal .form-grid > label > input:focus,
.quote-modal .form-grid > label > textarea:focus,
.quote-modal .form-grid > label > select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(26,115,232,.15) !important;
  background: #ffffff !important;
}
.quote-modal .form-grid > label.full-span {
  grid-column: 1 / -1 !important;
}
.quote-modal textarea#q-notes,
.quote-modal textarea[id="q-notes"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
  resize: vertical;
  margin-top: 4px;
}
@media (max-width: 768px) {
  .quote-modal .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .quote-modal .form-grid { grid-template-columns: 1fr; }
}
.quote-items { display: flex; flex-direction: column; gap: 8px; }
.quote-item-row {
  display: flex; align-items: center; gap: 6px;
  background: #f9f9f9; border: 1px solid #eee; border-radius: 6px; padding: 8px;
}
.quote-item-row .qi-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.quote-item-row .qi-info { display: flex; align-items: center; gap: 4px; }
.qi-input { flex: 1; min-width: 80px; }
.qi-input-sm { width: 70px; padding: 4px 6px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; }
.qi-amount { font-weight: 600; color: #e23a3a; min-width: 70px; text-align: right; }
.qi-del {
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: #f5f5f5; color: #999; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.qi-del:hover { background: #ff4d4f; color: #fff; }
.quote-summary {
  margin-top: 12px; padding: 10px 16px; background: #f0f5ff; border-radius: 6px;
}
.quote-summary-row { display: flex; justify-content: space-between; align-items: center; }
.quote-summary-row + .quote-summary-row { margin-top: 6px; }
.quote-total { font-weight: 600; font-size: 16px; }
.quote-final { font-weight: 700; font-size: 20px; color: #e23a3a; }

/* ===== P9-B: 空间报价 UI ===== */
.space-add-bar { display: flex; align-items: center; gap: 6px; }
.qs-space-select {
  padding: 5px 12px !important; border: 1px solid #d9d9d9 !important; border-radius: 6px !important;
  background: #ffffff !important; font-size: 13px !important; cursor: pointer;
  appearance: auto !important; -webkit-appearance: auto !important;
}
.qs-space-select option { background: #fff !important; color: #333 !important; }
.quote-spaces-container { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.quote-space-card {
  border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; background: #fff;
}
.quote-space-card:hover { border-color: #bbb; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.qs-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: #f0f7ff; border-bottom: 1px solid #e8e8e8;
}
.qs-name-input {
  font-weight: 600 !important; border: 1px solid transparent !important; background: transparent !important;
  padding: 4px 8px !important; border-radius: 4px !important; font-size: 14px !important;
  color: #1a73e8 !important;
}
.qs-name-input:focus { border-color: #1a73e8 !important; background: #fff !important; }
.qs-remark-input {
  flex: 1; border: 1px solid transparent !important; background: transparent !important;
  padding: 4px 8px !important; border-radius: 4px !important; font-size: 12px !important;
  color: #666 !important;
}
.qs-remark-input:focus { border-color: #d9d9d9 !important; background: #fff !important; }
.qs-remark-input::placeholder { color: #bbb !important; }
.qs-subtotal { font-weight: 700; font-size: 14px; color: #e23a3a; white-space: nowrap; margin-left: auto; }
.qs-del-btn {
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: transparent; color: #999; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.qs-del-btn:hover { background: #ff4d4f; color: #fff; }
.qs-toolbar {
  display: flex; gap: 6px; padding: 8px 14px; background: #fafafa; border-bottom: 1px solid #f0f0f0;
}
.qs-items { padding: 0; }
.qs-empty { padding: 12px 14px; font-size: 12px; color: #bbb; text-align: center; }
.qs-cat-group { border-bottom: 1px solid #f5f5f5; }
.qs-cat-group:last-child { border-bottom: none; }
.qs-cat-label {
  padding: 6px 14px; font-size: 12px; font-weight: 600; color: #888;
  background: #f8f9fa; border-bottom: 1px solid #f0f0f0;
}
.qs-cat-subtotal {
  padding: 4px 14px; font-size: 12px; color: #999; text-align: right;
  background: #fafafa; border-top: 1px dashed #eee;
}
/* 分类选择下拉框 */
.qi-cat-select {
  padding: 4px 6px !important; border: 1px solid #d9d9d9 !important; border-radius: 4px !important;
  background: #ffffff !important; font-size: 12px !important; cursor: pointer;
  appearance: auto !important; -webkit-appearance: auto !important; min-width: 60px;
}
.qi-cat-select option { background: #fff !important; color: #333 !important; }
/* 空间报价模式下的明细行 */
.quote-space-card .quote-item-row {
  background: #fff; border: 1px solid #f0f0f0; border-radius: 0;
  flex-wrap: wrap; padding: 8px 14px;
}
.quote-space-card .quote-item-row:hover { background: #f9fbff; }
.quote-space-card .qi-info { flex: 1; flex-wrap: wrap; gap: 4px; }
.quote-space-card .qi-input,
.quote-space-card .qi-input-sm {
  background: #ffffff !important; border: 1px solid #e0e0e0 !important; border-radius: 4px !important;
  padding: 4px 6px !important;
}
.quote-space-card .qi-input:focus,
.quote-space-card .qi-input-sm:focus {
  border-color: #1a73e8 !important;
}

/* 分享弹窗 */
.share-section label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.share-link-row { display: flex; gap: 6px; }
.share-link-row input {
  flex: 1; padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 6px;
  font-size: 12px; background: #f5f5f5;
}

/* 记录中已插入图片的展示 */
.img-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.img-list img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: transform .15s;
}
.img-list img:hover { transform: scale(1.06); box-shadow: var(--shadow-md); }

/* 图片查看弹窗 */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.img-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* ===== 名称定制 ===== */
.nav-item { position: relative; }
.nav-edit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s, background .15s;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: 4px;
  padding: 2px 6px;
}
/* 有编辑权限时，hover 显示 ✏️；无权限时仍隐藏（不渲染） P62 改浅色 */
.nav-item:hover .nav-edit { opacity: 1; background: #f3f4f6; color: #4b5563; }
.nav-edit:hover { background: #e5e7eb !important; color: #1f2937; }
.nav-item-settings { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; }

.names-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 16px; }
.name-edit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background .15s;
}
.name-edit-row:hover { background: #eef4ff; }
.name-edit-label { font-size: 13px; font-weight: 600; color: var(--text); display:flex;align-items:center;gap:6px; }
.name-edit-input { padding: 8px 10px; font-size: 13px; }
.name-edit-current {
  font-size: 13px;
  color: var(--text);
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  min-width: 60px;
  text-align: center;
}
.name-edit-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.name-edit-btn:hover { background: #fff3e0; }

/* ===== 页面标题内联编辑 ===== */
.page-title-row { display: flex; align-items: center; gap: 10px; }
.title-edit-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: .5;
  transition: all .15s;
}
.title-edit-btn:hover { opacity: 1; background: #fff3e0; }

/* ===== 责任人与审批人展示 ===== */
.owner-cell { margin-top: 6px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.owner-line, .approver-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.4; }
.owner-tag { display: inline-block; padding: 1px 7px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.4px; }
.owner-tag.tag-approval { background: #8f5bff; }
.approver-pill { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; background: #f1f5fb; color: var(--text); border: 1px solid #dde6f3; }
.approver-pill.app-ok { background: #e6f7ed; color: var(--green); border-color: #c9efd6; }
.approver-pill.app-no { background: #ffeced; color: var(--red); border-color: #ffd1d4; }
.approver-pill.app-wait { background: #fff5e6; color: #b86b00; border-color: #ffe1b3; }
.approver-arrow { color: var(--text-light); font-size: 11px; }

/* ===== 装修项目计划总表 ===== */
.plan-table { font-size: 13px; }
.plan-table thead th {
  background: linear-gradient(180deg, #f7fafd, #eef3fa);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  border-bottom: 2px solid #dde6f3;
}
.plan-table tbody tr.proc-row { cursor: pointer; transition: background 0.15s; }
.plan-table tbody tr.proc-row:hover { background: #f7fafd; }
.plan-table tbody td { vertical-align: middle; }
.cat-detail-row td { background: var(--bg-2) !important; padding: 0 !important; }
.cat-detail-row:hover { background: var(--bg-2) !important; }
.subtask-table { background: var(--bg-card); border-radius: 6px; overflow: hidden; }
.subtask-table thead th {
  background: var(--bg);
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  padding: 8px 12px;
}
.subtask-table tbody td { padding: 8px 12px; }
.proc-arrow { display: inline-block; width: 14px; color: var(--primary); font-weight: 700; }

/* ===== 审批人输入组件 ===== */
.approver-row { display: grid; grid-template-columns: 1.2fr 1.3fr 1.3fr 60px 30px; gap: 8px; margin-bottom: 8px; align-items: center; }
.approver-row .form-control { padding: 6px 10px; font-size: 13px; }
.approver-status { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; text-align: center; }
.approver-status.pending { background: #fff5e6; color: #b86b00; }
.approver-status.approved { background: #e6f7ed; color: var(--green); }
.approver-status.rejected { background: #ffeced; color: var(--red); }
.approver-del { background: #fff; border: 1px solid var(--border); color: var(--red); width: 28px; height: 28px; border-radius: 6px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.approver-del:hover { background: var(--red); color: #fff; border-color: var(--red); }
@media (max-width: 768px) {
  .approver-row { grid-template-columns: 1fr 1fr; grid-template-areas: "name role" "phone phone" "status del"; }
  .approver-row .approver-name { grid-area: name; }
  .approver-row .approver-role { grid-area: role; }
  .approver-row .approver-phone { grid-area: phone; }
  .approver-row .approver-status { grid-area: status; }
  .approver-row .approver-del { grid-area: del; }
}

/* ===== 详情区：审批流卡片 ===== */
.info-block { margin-top: 14px; padding: 12px 14px; background: #f8fafc; border-radius: 10px; border: 1px solid var(--border); }
.info-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.approval-flow { display: flex; flex-direction: column; gap: 8px; }
.approval-step { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; background: #fff; border-radius: 8px; border-left: 3px solid var(--border); }
.approval-step.pending { border-left-color: var(--yellow); }
.approval-step.approved { border-left-color: var(--green); }
.approval-step.rejected { border-left-color: var(--red); }
.approval-step .step-no { width: 28px; height: 28px; border-radius: 50%; background: #f1f5fb; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.approval-step.pending .step-no { background: #fff5e6; color: #b86b00; }
.approval-step.approved .step-no { background: #e6f7ed; color: var(--green); }
.approval-step.rejected .step-no { background: #ffeced; color: var(--red); }

/* ===== 工作台：待我审批 ===== */
.my-approval-card { border-left: 4px solid var(--primary); }
.my-approval-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 4px; }
.my-approval-item { background: linear-gradient(135deg, #f0f5ff 0%, #f8fafd 100%); border: 1px solid #dde6f3; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.mai-type { font-size: 11px; color: var(--text-light); font-weight: 600; }
.mai-title { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.mai-meta { font-size: 12px; color: var(--text-light); }
.mai-actions { display: flex; gap: 6px; margin-top: 4px; }
.mai-actions .btn { padding: 4px 10px; font-size: 12px; }

/* ===== 工地详情（项目下钻） ===== */
.pd-header { margin-bottom: 14px; }
.pd-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--text-light); }
.pd-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.pd-tab { display: flex; align-items: center; gap: 6px; padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-light); border-bottom: 2px solid transparent; margin-bottom: -2px; user-select: none; }
.pd-tab:hover { color: var(--primary); }
.pd-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.pd-entry-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pd-entry { display: flex; align-items: center; gap: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pd-entry:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(30,111,255,.08); }
.pd-entry-icon { font-size: 26px; }

/* =============================================================
   企业微信风格组件（扁平、克制、蓝色调）
   ============================================================= */

/* ---- 页面顶部：标题 + 操作 ---- */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.page-header .page-title { margin-bottom: 4px; }
.page-header .page-desc { margin-top: 0; }

/* ---- 状态徽标（企微风格） ---- */
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 11px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.status-pill::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.status-pill.active   { background: #e6f5e9; color: #2c8a3e; }
.status-pill.active::before   { background: #2c8a3e; }
.status-pill.inactive { background: #f5f5f5; color: #8a8a8a; }
.status-pill.inactive::before { background: #b5b5b5; }
.status-pill.shared     { background: #e8f1ff; color: #1e6fff; }
.status-pill.shared::before     { background: #1e6fff; }
.status-pill.standalone { background: #fff3e0; color: #d97706; }
.status-pill.standalone::before { background: #d97706; }

/* ---- 行内文字按钮（替代拥挤的小图标按钮） ---- */
.btn-text { display: inline-flex; align-items: center; padding: 4px 10px; background: transparent; border: none; color: var(--primary); cursor: pointer; font-size: 13px; border-radius: 4px; transition: background .15s; }
.btn-text:hover { background: rgba(30,111,255,.08); }
.btn-text.danger { color: #d9384a; }
.btn-text.danger:hover { background: rgba(217,56,74,.08); }

.row-actions { display: inline-flex; gap: 0; align-items: center; }
.row-actions .btn-text { padding: 4px 8px; font-size: 13px; }
.row-actions .btn-text + .btn-text { border-left: 1px solid var(--border); border-radius: 0; }

/* ---- 表单分节标题 ---- */
.form-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.form-section-title:first-child { margin-top: 0; }
.form-tip { font-size: 12px; color: var(--text-light); margin-bottom: 10px; line-height: 1.6; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-info { background: #e8f1ff; color: #1e6fff; border-left: 3px solid #1e6fff; }
.alert-warn { background: #fff3e0; color: #d97706; border-left: 3px solid #d97706; }
.alert-error { background: #fdecec; color: #d9384a; border-left: 3px solid #d9384a; }
.muted-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; background: #f1f5f9; color: var(--text-light); font-size: 12px; font-weight: normal; border-radius: 10px; }

/* ---- 使用规模（装修公司表格内） ---- */
.usage-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-light); }
.usage-stats span { display: inline-flex; align-items: center; gap: 2px; }

/* ---- 凭据弹窗（新建装修公司后展示账号密码） ---- */
.credential-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.credential-row:last-child { border-bottom: none; }
.cred-label { width: 70px; color: var(--text-light); font-size: 13px; }
.cred-value { flex: 1; font-family: 'SF Mono', Consolas, monospace; font-size: 14px; color: var(--text); background: #f7f9fc; padding: 6px 10px; border-radius: 4px; user-select: all; }

/* ---- 文字按钮：组织架构操作 ---- */
.org-row-actions { display: inline-flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.org-node-content:hover .org-row-actions { opacity: 1; }
.org-node-content:hover .org-row-actions-static { opacity: 0.6; }

/* ---- 左侧二级导航（学企微侧边栏 hover 展开） ---- P62 改浅色 */
.nav-section-label {
  padding: 18px 22px 6px;                          /* P62 改：14×18/4 → 18×22/6 宽松 */
  font-size: 12px;                                 /* P62 改：11→12 略大 */
  color: #7490c2;                                  /* P63b 改：#8ba2c9 → 蓝灰 */
  font-weight: 500;                                /* P62 新增 */
  letter-spacing: 0;                               /* P62 改：1→0 大写英文间距去掉 */
  text-transform: none;                            /* P62 改：UPPERCASE → none */
}
.nav-divider {
  height: 1px;
  background: var(--sidebar-border);               /* P62 改：白透明 → 浅灰 */
  margin: 8px 22px;                                /* P62 改：6×12 → 8×22 宽松 */
}

/* ---- 表格头部紧凑 ---- */
.data-table thead th { font-weight: 500; font-size: 12px; color: var(--text-light); background: #fafbfc; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #f7f9fc; }
.text-right { text-align: right; }

/* ---- 表单弹窗中：段落标题 + 提示语 ---- */

/* ===== P8 报价单增强 ===== */

/* 统计看板 */
.quote-stats-bar { display: flex; gap: 12px; margin-bottom: 16px; }
.qs-card { flex: 1; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; padding: 12px 16px; text-align: center; }
.qs-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.qs-num { font-size: 22px; font-weight: 700; color: var(--primary); }
.qs-label { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 对比模式工具条 */
.compare-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #f0f5ff; border: 1px solid #d4e3ff; border-radius: 8px; margin-bottom: 12px; }
.compare-cb { width: 18px; height: 18px; cursor: pointer; }

/* 对比表格 */
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th { background: #f0f5ff; padding: 8px 10px; text-align: center; border: 1px solid #d9d9d9; font-size: 12px; }
.compare-table th:first-child { text-align: left; }
.compare-table td { padding: 6px 10px; border: 1px solid #e8e8e8; text-align: center; }
.compare-table td:first-child { text-align: left; }
.compare-item-name { font-weight: 500; }
.compare-spec { font-size: 11px; color: #999; }
.compare-miss { color: #ccc; }
.compare-subtotal { font-size: 11px; color: #666; }
.compare-amount { font-size: 14px; font-weight: 700; color: #e23a3a; }
.compare-total-row { background: #f9f9f9; font-weight: 600; }
.compare-more { color: #c62828; font-size: 11px; }
.compare-less { color: #2e7d32; font-size: 11px; }

/* 商品选择器网格 */
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pp-card { border: 1px solid #e8e8e8; border-radius: 8px; overflow: hidden; cursor: pointer; transition: all .15s; background: #fff; }
.pp-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(26,115,232,.12); transform: translateY(-2px); }
.pp-img { width: 100%; height: 100px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.pp-img img { width: 100%; height: 100%; object-fit: cover; }
.pp-info { padding: 8px; position: relative; }
.pp-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.pp-brand { font-size: 11px; color: var(--text-light); }
.pp-price { color: #e23a3a; font-weight: 700; font-size: 15px; margin-top: 4px; }
.pp-unit { font-size: 11px; color: var(--text-light); font-weight: 400; }
.pp-badge { position: absolute; top: 4px; right: 4px; font-size: 10px; padding: 1px 6px; border-radius: 3px; background: #e3f2fd; color: #1976d2; }
.pp-badge-own { background: #e8f5e9; color: #2e7d32; }

/* 模板卡片（修复：原版缺 background，显示透明） */
.tpl-card {
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  transition: all .15s !important;
  margin-bottom: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
.tpl-card:hover { border-color: var(--primary) !important; background: #f8fbff !important; box-shadow: 0 2px 8px rgba(26,115,232,.1) !important; }
.tpl-name { font-weight: 600; font-size: 14px; }
.tpl-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-light); margin-top: 6px; }
.tpl-amount { color: #e23a3a; font-weight: 600; }
.tpl-date { font-size: 11px; color: #ccc; margin-top: 4px; }

/* 浏览记录时间线 */
.vl-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.vl-item:last-child { border-bottom: none; }
.vl-dot { width: 10px; height: 10px; border-radius: 50%; background: #d9d9d9; margin-top: 4px; flex-shrink: 0; }
.vl-dot-latest { background: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.2); }
.vl-content { flex: 1; }

/* ========== 修复 P8 透明背景问题（v=20260820h） ========== */

/* 1. modal-content 强制白底（之前完全没定义，所有弹窗都透明） */
.modal-content {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.18) !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* 2. 搜索框 .search-box（之前完全没定义） */
.search-box {
  padding: 7px 12px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  background: #ffffff !important;
  color: #222 !important;
  outline: none !important;
  min-width: 200px !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.search-box:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(26,115,232,.15) !important;
}
.search-box::placeholder { color: #aaa !important; }

/* 3. page-toolbar 工具条（之前没定义） */
.page-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  background: #ffffff !important;
}

/* 4. 所有 select 强制白底（之前浏览器默认可能透明） */
select, .form-grid select, .page-toolbar select, .filter-bar select {
  background: #ffffff !important;
  color: #222 !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M0 2l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  padding-right: 24px !important;
}
select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(26,115,232,.15) !important;
}

/* 5. 报价明细行容器（之前依赖 .quote-items） */
.quote-items { background: #ffffff !important; }

/* 6. 商品选择器 modal-content 内的搜索框+select 工具条 */
.picker-toolbar, .modal-body > .page-toolbar {
  background: #ffffff !important;
  padding: 8px 0 !important;
}

/* 7. 空状态卡片（透明显示问题） */
.empty-state {
  background: transparent !important;
  color: var(--text-light) !important;
  text-align: center !important;
  padding: 40px 20px !important;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* 8. 商品选择器弹窗 - 强制白底覆盖 */
.modal-content #pp-search,
.modal-content #pp-cat,
.modal-content .search-box,
.modal-content select {
  background: #ffffff !important;
  color: #222 !important;
  border: 1px solid #d9d9d9 !important;
}

/* 9. 模板选择器弹窗 - 强制白底 */
.modal-content .tpl-card {
  background: #ffffff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  cursor: pointer !important;
}

/* 10. 报价单弹窗里所有 input/textarea/select 强制白底 */
.quote-modal input,
.quote-modal textarea,
.quote-modal select,
.quote-modal button,
.modal-content input,
.modal-content textarea,
.modal-content select {
  background: #ffffff !important;
  color: #222 !important;
}

/* P9-A 商品 Tab + 来源标记 + 批量勾选 */
.prod-tab { transition: all .15s; user-select: none; }
.prod-tab:hover { background: #f8fbff; }
.prod-badge-source {
  position: absolute; top: 6px; left: 6px;
  background: #e3f2fd; color: #1976d2;
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  font-weight: 500;
}
.prod-added { opacity: 0.65; background: #f8fdf8 !important; }
.prod-added:hover { opacity: 1; }
.catalog-cb { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }

.vl-time { font-size: 13px; font-weight: 500; }
.vl-detail { font-size: 11px; color: var(--text-light); margin-top: 2px; }


/* ===== P10: 报价单明细行重设计（图片+做工+质保+工程量） ===== */
.quote-item-row {
  display: flex !important;
  gap: 10px !important;
  align-items: stretch !important;
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 6px !important;
  padding: 8px !important;
  margin-bottom: 8px !important;
}
.quote-item-row:hover {
  border-color: #d0e3ff !important;
  box-shadow: 0 1px 4px rgba(26,115,232,.08) !important;
}
.qi-img-btn {
  flex: 0 0 70px !important;
  width: 70px !important;
  height: 70px !important;
  background: #fafafa !important;
  border: 1px dashed #d0d0d0 !important;
  border-radius: 4px !important;
  padding: 0 !important;
  cursor: pointer !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.qi-img-btn:hover {
  border-color: #1a73e8 !important;
  background: #f0f5ff !important;
}
.qi-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.qi-thumb-placeholder {
  font-size: 24px !important;
  color: #bbb !important;
}
.qi-info-main {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.qi-row1 {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}
.qi-row2 {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}
.qi-name-input {
  flex: 1 1 220px !important;
  min-width: 160px !important;
  font-weight: 600 !important;
  border: 1px solid #d9d9d9 !important;
  background: #fff !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
}
.qi-mini {
  border: 1px solid #d9d9d9 !important;
  background: #fff !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}
.qi-cat-select,
.qi-warranty-select {
  border: 1px solid #d9d9d9 !important;
  background: #fff !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
.qi-method-input {
  flex: 1 1 280px !important;
  min-width: 200px !important;
  border: 1px solid #d9d9d9 !important;
  background: #fff !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  font-size: 13px !important;
}
.qi-num {
  text-align: right !important;
}
.qi-x {
  color: #999 !important;
  padding: 0 2px !important;
}
.qi-amount {
  flex: 0 0 auto !important;
  font-weight: 700 !important;
  color: #e23a3a !important;
  padding: 0 6px !important;
  font-size: 14px !important;
}
.qi-del {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  background: #fff0f0 !important;
  color: #c0392b !important;
  border: 1px solid #ffd0d0 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  align-self: flex-end !important;
  margin-bottom: 1px !important;
}
.qi-del:hover {
  background: #ffeded !important;
  color: #e00 !important;
}

/* ===== P81：报价套餐组合卡片（折叠联动） ===== */
.qs-pkg-card {
  background: #fffbe6 !important;
  border: 1px solid #ffe082 !important;
  border-radius: 8px !important;
  padding: 6px !important;
  margin-bottom: 10px !important;
}
.qs-pkg-card:hover {
  border-color: #e26b00 !important;
}
.qs-pkg-header {
  transition: box-shadow 0.15s, background 0.15s !important;
  user-select: none !important;
}
.qs-pkg-header:hover {
  box-shadow: 0 2px 8px rgba(226, 107, 0, 0.15) !important;
  background: linear-gradient(90deg, #fff3cd, #ffeaa7) !important;
}
.qs-pkg-toggle {
  display: inline-block !important;
  transition: transform 0.15s !important;
  width: 16px !important;
  text-align: center !important;
}
.qs-pkg-body {
  margin-top: 6px !important;
  border-top: 1px dashed #ffe082 !important;
  padding-top: 6px !important;
}
.qs-pkg-section-label {
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
}
.quote-item-row.qi-pkg-main {
  background: #fff9e6 !important;
  border: 1px solid #ffd54f !important;
  box-shadow: inset 3px 0 0 #e26b00 !important;
}
.qs-pkg-foot {
  border: 1px dashed #ffe082 !important;
}

/* 商品选择器多选模式 */
.pp-card {
  position: relative !important;
  cursor: pointer !important;
  background: #fff !important;
  border: 2px solid #e8e8e8 !important;
  border-radius: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: border-color .15s !important;
}
.pp-card:hover {
  border-color: #1a73e8 !important;
}
.pp-card.pp-selected {
  border-color: #1a73e8 !important;
  background: #f0f5ff !important;
  box-shadow: 0 0 0 2px rgba(26,115,232,.15) !important;
}
.pp-cb {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  width: 20px !important;
  height: 20px !important;
  cursor: pointer !important;
  z-index: 2 !important;
  accent-color: #1a73e8 !important;
}

/* 费用库 Tab */
.fee-tab {
  padding: 10px 16px !important;
  cursor: pointer !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  font-weight: 500 !important;
  color: #666 !important;
  transition: all .15s !important;
}
.fee-tab:hover {
  color: #1a73e8 !important;
}
.fee-tab.active {
  color: #1a73e8 !important;
  border-bottom-color: #1a73e8 !important;
  font-weight: 700 !important;
}
.fee-row {
  background: #fff !important;
  border: 1px solid #eee !important;
  transition: all .15s !important;
}
.fee-row:hover {
  border-color: #1a73e8 !important;
  background: #fafcff !important;
}

/* 费用库管理表格 */
.fee-lib-section {
  margin-bottom: 16px !important;
}
.fee-count {
  display: inline-block !important;
  background: #f0f5ff !important;
  color: #1a73e8 !important;
  border-radius: 10px !important;
  padding: 2px 10px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  margin-left: 6px !important;
}

/* ==================== P13 报价汇总 + 树形分类 ==================== */
/* 平台端报价汇总统计卡片 */
.quote-summary-stats {
  display: flex !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
  flex-wrap: wrap !important;
}
.qs-stat-card {
  flex: 1 !important;
  min-width: 180px !important;
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  padding: 18px 22px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
}
.qs-stat-card.qs-stat-grand {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.qs-stat-num {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #e26b00 !important;
  margin-bottom: 6px !important;
}
.qs-stat-card.qs-stat-grand .qs-stat-num {
  color: #fff !important;
}
.qs-stat-label {
  font-size: 13px !important;
  color: #888 !important;
}
.qs-stat-card.qs-stat-grand .qs-stat-label {
  color: rgba(255,255,255,0.85) !important;
}
.quote-summary-table {
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* 树形分类管理 - 三按钮操作 */
.cat-op-btn {
  display: inline-block !important;
  padding: 4px 10px !important;
  margin-right: 4px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  color: #fff !important;
  border: none !important;
  transition: opacity 0.15s !important;
}
.cat-op-btn:hover {
  opacity: 0.85 !important;
}
.cat-op-edit {
  background: #4f8cff !important;
}
.cat-op-addsub {
  background: #07c160 !important;
}
.cat-op-del {
  background: #ff4d4f !important;
  margin-right: 0 !important;
}

/* 报价状态徽章 */
.quote-status {
  display: inline-block !important;
  padding: 2px 8px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}
.quote-status-draft {
  background: #f5f5f5 !important;
  color: #666 !important;
}
.quote-status-sent {
  background: #e3f2fd !important;
  color: #1a73e8 !important;
}
.quote-status-viewed {
  background: #e8f5e9 !important;
  color: #2e7d32 !important;
}
.quote-status-expired {
  background: #ffebee !important;
  color: #c62828 !important;
}

/* ==================== P14 权限中文化 + 删/分享按钮 ==================== */
.btn-danger {
  background: #ff4d4f !important;
  border-color: #ff4d4f !important;
  color: #fff !important;
}
.btn-danger:hover {
  background: #ff7875 !important;
  border-color: #ff7875 !important;
}

.perm-name {
  color: #333;
  font-weight: 500;
}
.perm-desc {
  color: #999;
  font-size: 11px;
  margin-left: 6px;
  border-left: 2px solid #e0e0e0;
  padding-left: 6px;
}

/* ========== P32 酷家乐式户型编辑器 ========== */
.fp-kjl-layout {
  display: flex;
  flex-direction: column;
  height: 78vh;
  min-height: 620px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #f5f6f8;
  overflow: hidden;
}
.fp-kjl-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.fp-kjl-toolbar .fp-tb-group {
  display: flex;
  gap: 2px;
  padding: 0 6px;
  border-right: 1px solid #eee;
  height: 28px;
  align-items: center;
}
.fp-kjl-toolbar .fp-tb-group:last-child { border-right: 0; }
.fp-kjl-toolbar button {
  width: 32px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: #555;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.fp-kjl-toolbar button:hover { background: #eef3fa; color: #1a73e8; }
.fp-kjl-toolbar button:active { background: #d7e5fa; }
.fp-kjl-toolbar button[disabled] { color: #ccc; cursor: not-allowed; background: transparent; }
.fp-kjl-toolbar .fp-tb-title {
  font-weight: 700;
  color: #1a73e8;
  font-size: 14px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fp-kjl-toolbar .fp-tb-spacer { flex: 1; }
.fp-kjl-toolbar .fp-tb-exit {
  font-size: 13px;
  padding: 0 14px;
  width: auto;
  height: 28px;
  border-radius: 6px;
  color: #e53935;
  border: 1px solid #f5c8c8;
  background: #fff;
}
.fp-kjl-toolbar .fp-tb-render4k {
  font-size: 12px;
  padding: 0 10px;
  width: auto;
  height: 26px;
  border-radius: 13px;
  background: linear-gradient(90deg,#ff6f00,#ff9800);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fp-kjl-toolbar .fp-tb-render4k.off { background: #fff; color: #ff6f00; border: 1px solid #ffb74d; }

.fp-kjl-body { flex: 1; display: flex; min-height: 0; }
.fp-kjl-left, .fp-kjl-right {
  width: 240px;
  background: #fff;
  overflow-y: auto;
  flex-shrink: 0;
}
.fp-kjl-left { border-right: 1px solid #eee; }
.fp-kjl-right { border-left: 1px solid #eee; }
.fp-kjl-center { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f5f6f8; }

.fp-kjl-section { border-bottom: 1px solid #f0f0f0; }
.fp-kjl-section-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.fp-kjl-section-hd .arr { margin-left: auto; color: #bbb; font-size: 11px; }
.fp-kjl-section-bd { padding: 8px 12px 14px; }
.fp-kjl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.fp-kjl-icon {
  aspect-ratio: 1;
  border: 1px solid #eaedf2;
  border-radius: 8px;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all .15s;
  padding: 6px 4px;
  text-align: center;
}
.fp-kjl-icon:hover { border-color: #1a73e8; background: #eef3fa; }
.fp-kjl-icon.active { border-color: #1a73e8; background: linear-gradient(135deg,#e8f0fe,#d7e5fa); }
.fp-kjl-icon.active .fp-kjl-icon-glyph { color: #1a73e8; }
.fp-kjl-icon-glyph {
  font-size: 22px;
  line-height: 1;
  color: #555;
  filter: grayscale(0.2);
}
.fp-kjl-icon-lbl {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.fp-kjl-icon.emoji .fp-kjl-icon-glyph { font-size: 24px; filter: none; }
.fp-kjl-canvas {
  flex: 1;
  position: relative;
  background:
    linear-gradient(0deg, transparent 24%, rgba(0,0,0,.04) 25%, rgba(0,0,0,.04) 26%, transparent 27%, transparent 74%, rgba(0,0,0,.04) 75%, rgba(0,0,0,.04) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(0,0,0,.04) 25%, rgba(0,0,0,.04) 26%, transparent 27%, transparent 74%, rgba(0,0,0,.04) 75%, rgba(0,0,0,.04) 76%, transparent 77%, transparent),
    #fafbfc;
  background-size: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 16px;
}
.fp-kjl-canvas-inner {
  position: relative;
  background: #fff;
  box-shadow: 0 6px 30px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  border-radius: 4px;
}
.fp-kjl-floor-switch {
  display: flex;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  flex-shrink: 0;
  padding: 8px 14px;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  color: #777;
}
.fp-kjl-floor-tabs { display: flex; gap: 4px; }
.fp-kjl-floor-tabs button {
  padding: 4px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}
.fp-kjl-floor-tabs button.active { border-color: #1a73e8; background: #1a73e8; color: #fff; }
.fp-kjl-floor-meta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.fp-kjl-floor-meta label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }

.fp-prop-card {
  margin: 10px 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.fp-prop-hd {
  padding: 8px 12px;
  background: #fafbfd;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}
.fp-prop-hd .badge {
  font-size: 10px;
  color: #1a73e8;
  background: #e8f0fe;
  padding: 1px 6px;
  border-radius: 8px;
}
.fp-prop-bd { padding: 10px 12px 12px; }
.fp-prop-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.fp-prop-row label { flex: 0 0 56px; color: #777; }
.fp-prop-row input[type="number"], .fp-prop-row input[type="text"], .fp-prop-row select {
  flex: 1;
  padding: 4px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
}
.fp-prop-row input[type="range"] { flex: 1; }
.fp-prop-row .unit { flex: 0 0 26px; color: #999; font-size: 11px; text-align: right; margin-left: 4px; }
.fp-prop-row .swatch { width: 26px; height: 22px; border-radius: 4px; border: 1px solid #ddd; margin-right: 6px; cursor: pointer; }

.fp-recog-bar {
  margin: 6px 12px 0;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(90deg,#e3f2fd,#f3e5f5);
  border-radius: 8px;
  align-items: center;
  font-size: 12px;
}
.fp-recog-bar .fp-recog-icon { font-size: 16px; }
.fp-recog-bar .fp-recog-text { flex: 1; min-width: 0; }
.fp-recog-bar .fp-recog-label { font-weight: 600; color: #1976d2; }
.fp-recog-bar .fp-recog-detail { font-size: 11px; color: #666; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-recog-bar .fp-recog-badge { background: #4caf50; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; display: none; }
.fp-recog-bar .fp-recog-badge.show { display: inline-block; }
.fp-recog-bar button {
  border: 0;
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  color: #1976d2;
}

.fp-svg-grid { stroke: #e0e3e8; stroke-width: 0.3; }
.fp-svg-wall-thick { stroke: #2c3e50; stroke-width: 6; fill: none; stroke-linejoin: round; opacity: 0.85; }
.fp-svg-wall-thin  { stroke: #fff; stroke-width: 2; fill: none; stroke-linejoin: round; }
.fp-svg-dim-text {
  font-size: 9px;
  fill: #5a5a5a;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.fp-svg-room-label {
  font-size: 13px;
  font-weight: 700;
  fill: #1a1a1a;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.18));
}
.fp-svg-room-area {
  font-size: 10px;
  fill: #e74c3c;
  font-weight: 600;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
}

.fp-svg-room-poly { transition: filter .15s; }
.fp-svg-room-poly:hover { filter: brightness(1.05) drop-shadow(0 0 4px rgba(26,115,232,0.5)); }

@media (max-width: 1180px) {
  .fp-kjl-left, .fp-kjl-right { width: 200px; }
}
/* ========== P32 酷家乐式户型编辑器 ========== */
.fp-kjl-layout {
  display: flex;
  flex-direction: column;
  height: 78vh;
  min-height: 620px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #f5f6f8;
  overflow: hidden;
}
.fp-kjl-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.fp-kjl-toolbar .fp-tb-group {
  display: flex;
  gap: 2px;
  padding: 0 6px;
  border-right: 1px solid #eee;
  height: 28px;
  align-items: center;
}
.fp-kjl-toolbar .fp-tb-group:last-child { border-right: 0; }
.fp-kjl-toolbar button {
  width: 32px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: #555;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.fp-kjl-toolbar button:hover { background: #eef3fa; color: #1a73e8; }
.fp-kjl-toolbar button:active { background: #d7e5fa; }
.fp-kjl-toolbar button[disabled] { color: #ccc; cursor: not-allowed; background: transparent; }
.fp-kjl-toolbar .fp-tb-title {
  font-weight: 700;
  color: #1a73e8;
  font-size: 14px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fp-kjl-toolbar .fp-tb-spacer { flex: 1; }
.fp-kjl-toolbar .fp-tb-exit {
  font-size: 13px;
  padding: 0 14px;
  width: auto;
  height: 28px;
  border-radius: 6px;
  color: #e53935;
  border: 1px solid #f5c8c8;
  background: #fff;
}
.fp-kjl-toolbar .fp-tb-render4k {
  font-size: 12px;
  padding: 0 10px;
  width: auto;
  height: 26px;
  border-radius: 13px;
  background: linear-gradient(90deg,#ff6f00,#ff9800);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fp-kjl-toolbar .fp-tb-render4k.off { background: #fff; color: #ff6f00; border: 1px solid #ffb74d; }

.fp-kjl-body { flex: 1; display: flex; min-height: 0; }
.fp-kjl-left, .fp-kjl-right {
  width: 240px;
  background: #fff;
  overflow-y: auto;
  flex-shrink: 0;
}
.fp-kjl-left { border-right: 1px solid #eee; }
.fp-kjl-right { border-left: 1px solid #eee; }
.fp-kjl-center { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f5f6f8; }

.fp-kjl-section { border-bottom: 1px solid #f0f0f0; }
.fp-kjl-section-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.fp-kjl-section-hd .arr { margin-left: auto; color: #bbb; font-size: 11px; }
.fp-kjl-section-bd { padding: 8px 12px 14px; }
.fp-kjl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.fp-kjl-icon {
  aspect-ratio: 1;
  border: 1px solid #eaedf2;
  border-radius: 8px;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all .15s;
  padding: 6px 4px;
  text-align: center;
}
.fp-kjl-icon:hover { border-color: #1a73e8; background: #eef3fa; }
.fp-kjl-icon.active { border-color: #1a73e8; background: linear-gradient(135deg,#e8f0fe,#d7e5fa); }
.fp-kjl-icon.active .fp-kjl-icon-glyph { color: #1a73e8; }
.fp-kjl-icon-glyph {
  font-size: 22px;
  line-height: 1;
  color: #555;
  filter: grayscale(0.2);
}
.fp-kjl-icon-lbl {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.fp-kjl-icon.emoji .fp-kjl-icon-glyph { font-size: 24px; filter: none; }
.fp-kjl-canvas {
  flex: 1;
  position: relative;
  background:
    linear-gradient(0deg, transparent 24%, rgba(0,0,0,.04) 25%, rgba(0,0,0,.04) 26%, transparent 27%, transparent 74%, rgba(0,0,0,.04) 75%, rgba(0,0,0,.04) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(0,0,0,.04) 25%, rgba(0,0,0,.04) 26%, transparent 27%, transparent 74%, rgba(0,0,0,.04) 75%, rgba(0,0,0,.04) 76%, transparent 77%, transparent),
    #fafbfc;
  background-size: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 16px;
}
.fp-kjl-canvas-inner {
  position: relative;
  background: #fff;
  box-shadow: 0 6px 30px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  border-radius: 4px;
}
.fp-kjl-floor-switch {
  display: flex;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  flex-shrink: 0;
  padding: 8px 14px;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  color: #777;
}
.fp-kjl-floor-tabs { display: flex; gap: 4px; }
.fp-kjl-floor-tabs button {
  padding: 4px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}
.fp-kjl-floor-tabs button.active { border-color: #1a73e8; background: #1a73e8; color: #fff; }
.fp-kjl-floor-meta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.fp-kjl-floor-meta label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }

.fp-prop-card {
  margin: 10px 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.fp-prop-hd {
  padding: 8px 12px;
  background: #fafbfd;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}
.fp-prop-hd .badge {
  font-size: 10px;
  color: #1a73e8;
  background: #e8f0fe;
  padding: 1px 6px;
  border-radius: 8px;
}
.fp-prop-bd { padding: 10px 12px 12px; }
.fp-prop-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.fp-prop-row label { flex: 0 0 56px; color: #777; }
.fp-prop-row input[type="number"], .fp-prop-row input[type="text"], .fp-prop-row select {
  flex: 1;
  padding: 4px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
}
.fp-prop-row input[type="range"] { flex: 1; }
.fp-prop-row .unit { flex: 0 0 26px; color: #999; font-size: 11px; text-align: right; margin-left: 4px; }
.fp-prop-row .swatch { width: 26px; height: 22px; border-radius: 4px; border: 1px solid #ddd; margin-right: 6px; cursor: pointer; }

.fp-recog-bar {
  margin: 6px 12px 0;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(90deg,#e3f2fd,#f3e5f5);
  border-radius: 8px;
  align-items: center;
  font-size: 12px;
}
.fp-recog-bar .fp-recog-icon { font-size: 16px; }
.fp-recog-bar .fp-recog-text { flex: 1; min-width: 0; }
.fp-recog-bar .fp-recog-label { font-weight: 600; color: #1976d2; }
.fp-recog-bar .fp-recog-detail { font-size: 11px; color: #666; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-recog-bar .fp-recog-badge { background: #4caf50; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; display: none; }
.fp-recog-bar .fp-recog-badge.show { display: inline-block; }
.fp-recog-bar button {
  border: 0;
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  color: #1976d2;
}

.fp-svg-grid { stroke: #e0e3e8; stroke-width: 0.3; }
.fp-svg-wall-thick { stroke: #2c3e50; stroke-width: 6; fill: none; stroke-linejoin: round; opacity: 0.85; }
.fp-svg-wall-thin  { stroke: #fff; stroke-width: 2; fill: none; stroke-linejoin: round; }
.fp-svg-dim-text {
  font-size: 9px;
  fill: #5a5a5a;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.fp-svg-room-label {
  font-size: 13px;
  font-weight: 700;
  fill: #1a1a1a;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.18));
}
.fp-svg-room-area {
  font-size: 10px;
  fill: #e74c3c;
  font-weight: 600;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
}

.fp-svg-room-poly { transition: filter .15s; }
.fp-svg-room-poly:hover { filter: brightness(1.05) drop-shadow(0 0 4px rgba(26,115,232,0.5)); }

@media (max-width: 1180px) {
  .fp-kjl-left, .fp-kjl-right { width: 200px; }
}

/* ========== P33: 右键菜单 + 家具实体 ========== */
.fp-ctx-menu {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  min-width: 176px;
  padding: 4px;
  font-size: 13px;
  user-select: none;
  animation: fpCtxIn .12s ease-out;
}
@keyframes fpCtxIn { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.fp-ctx-menu .fp-ctx-hd {
  padding: 7px 10px 5px;
  font-size: 11px;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 3px;
  font-weight: 600;
  letter-spacing: .3px;
}
.fp-ctx-menu .fp-ctx-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #333;
  transition: background .1s;
}
.fp-ctx-menu .fp-ctx-item:hover { background: #eef3fa; color: #1a73e8; }
.fp-ctx-menu .fp-ctx-item.danger { color: #c62828; }
.fp-ctx-menu .fp-ctx-item.danger:hover { background: #fdecea; color: #e53935; }
.fp-ctx-menu .fp-ctx-sep { height: 1px; background: #f0f0f0; margin: 3px 6px; }
.fp-ctx-menu .fp-ctx-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 2px 6px 6px;
}
.fp-ctx-menu .fp-ctx-types span {
  font-size: 11px;
  padding: 4px 2px;
  text-align: center;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  cursor: pointer;
  color: #555;
  transition: all .1s;
}
.fp-ctx-menu .fp-ctx-types span:hover { border-color: #1a73e8; color: #1a73e8; background: #eef3fa; }


/* ================= P35: 编辑器增强 + 设计大厅 ================= */
.fp-kjl-toolbar button.on {
  background: #1a73e8 !important;
  color: #fff !important;
  border-color: #1a73e8 !important;
}
.fp-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.fp-tpl-card {
  border: 2px solid #e3e8ef; border-radius: 12px; padding: 16px 14px; cursor: pointer;
  transition: all .15s; background: linear-gradient(160deg, #ffffff, #f3f7ff);
}
.fp-tpl-card:hover { border-color: #1a73e8; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,115,232,.12); }
.fp-tpl-name { font-size: 16px; font-weight: 700; color: #2b3440; }
.fp-tpl-desc { font-size: 12px; color: #888; margin-top: 4px; }
.fp-tpl-meta { font-size: 11px; color: #1a73e8; margin-top: 8px; font-weight: 600; }
/* 设计大厅 */
.dh-tabs { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.dh-tab { padding: 6px 16px; border-radius: 20px; border: 1px solid #dfe3ea; background: #fff; font-size: 13px; color: #666; cursor: pointer; }
.dh-tab.on { background: #1F5DE8; color: #fff; border-color: #1F5DE8; }
.dh-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.dh-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.dh-card-hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dh-card-hd b { font-size: 15px; color: #2b3440; }
.dh-status { font-size: 12px; padding: 2px 10px; border-radius: 4px; white-space: nowrap; }
.dh-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #777; margin-top: 8px; }
.dh-card-req { margin-top: 8px; font-size: 13px; color: #555; background: #f7f9fc; border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.dh-card-img { max-width: 180px; max-height: 120px; margin-top: 8px; border-radius: 8px; border: 1px solid #e8ecf2; cursor: zoom-in; display: block; }
.dh-card-assign { margin-top: 8px; font-size: 12px; color: #1a73e8; font-weight: 600; }
.dh-card-reply { margin-top: 6px; font-size: 12px; color: #16a34a; background: #f0fbf4; border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.dh-card-ft { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e8ecf2; }
.dh-time { font-size: 11px; color: #aaa; }
.dh-acts { display: flex; gap: 6px; }
/* P109 设计大厅双模式（设计需求 / 挑选设计师）*/
.dh-mode { display: flex; gap: 8px; }
.dh-mode-btn { padding: 8px 18px; border-radius: 8px; border: 1px solid #dfe3ea; background: #fff; font-size: 14px; color: #4E5969; cursor: pointer; }
.dh-mode-btn.on { background: #1a73e8; color: #fff; border-color: #1a73e8; font-weight: 600; }
.dh-ds-wrap { margin-top: 14px; }
.dh-ds-filter { background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.dh-ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dh-ds-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); display: flex; flex-direction: column; gap: 10px; }
.dh-ds-hd { display: flex; align-items: center; gap: 12px; }
.dh-ds-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #1a73e8, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.dh-st-tag { display: inline-block; background: #f1f5f9; color: #475569; border-radius: 12px; padding: 2px 10px; font-size: 12px; }
.dh-ds-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: #f8fafc; border-radius: 10px; padding: 8px; }
.dh-ds-stat div { text-align: center; }
.dh-ds-stat b { display: block; font-size: 15px; color: #2b3440; }
.dh-ds-stat span { font-size: 11px; color: #94a3b8; }
.dh-ds-ft { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.dh-nego-list { display: flex; flex-direction: column; gap: 8px; }
.dh-nego-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.03); }

/* ================= P36: 平面布置组件库（双Tab左面板） ================= */
.fp-kjl-tabs { display: flex; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid #eef1f5; background: #fafbfd; position: sticky; top: 0; z-index: 5; }
.fp-kjl-tabs button { flex: 1; padding: 8px 4px; border: 1px solid #e3e8ef; background: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; color: #5f6b7a; cursor: pointer; transition: all .15s; }
.fp-kjl-tabs button:hover { border-color: #c5d3e8; color: #1a73e8; }
.fp-kjl-tabs button.on { background: #1a73e8; border-color: #1a73e8; color: #fff; box-shadow: 0 2px 8px rgba(26,115,232,.25); }
.fp-lib-search { padding: 8px 10px 4px; }
.fp-lib-search input { width: 100%; box-sizing: border-box; padding: 7px 10px; border: 1px solid #e3e8ef; border-radius: 8px; font-size: 12px; outline: none; background: #fff; }
.fp-lib-search input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.fp-lib-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 10px 8px; }
.fp-lib-chip { padding: 4px 9px; border: 1px solid #e3e8ef; background: #fff; border-radius: 999px; font-size: 11.5px; color: #5f6b7a; cursor: pointer; white-space: nowrap; transition: all .15s; }
.fp-lib-chip:hover { border-color: #1a73e8; color: #1a73e8; }
.fp-lib-chip.on { background: #e8f0fe; border-color: #1a73e8; color: #1a73e8; font-weight: 600; }
.fp-lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 10px 16px; overflow-y: auto; }
.fp-lib-card { border: 1px solid #e8ecf2; border-radius: 10px; background: #fff; padding: 6px 4px 7px; text-align: center; cursor: pointer; transition: all .15s; }
.fp-lib-card:hover { border-color: #1a73e8; box-shadow: 0 3px 10px rgba(26,115,232,.14); transform: translateY(-2px); }
.fp-lib-card:active { transform: scale(.96); }
.fp-lib-card-svg { height: 40px; display: flex; align-items: center; justify-content: center; }
.fp-lib-card-svg svg { max-width: 92%; }
.fp-lib-card-name { font-size: 11px; color: #333; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fp-lib-card-size { font-size: 10px; color: #9aa5b1; }

/* P42: 报价计算器样式 */
.qc-tab-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .2s;
}
.qc-tab-btn:hover { color: #1a73e8; }
.qc-tab-btn.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  font-weight: 600;
}

/* ===== 报价计算器样式 ===== */
.qc-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #475569;
}
.qc-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}
.qc-tab {
  padding: 8px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #9aa5b1;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.qc-tab:hover {
  color: #1a73e8;
}
.qc-tab-active {
  color: #1a73e8 !important;
  border-bottom-color: #1a73e8 !important;
  font-weight: 600;
}
.qc-modes {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
}
.qc-modes label {
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.qc-modes input[type="radio"] {
  cursor: pointer;
  accent-color: #1a73e8;
}
.qc-sub-panel {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}
.qc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qc-input-row label {
  font-size: 13px;
  color: #475569;
  white-space: nowrap;
}
.qc-num-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #475569;
}
.qc-num-input:focus {
  border-color: #1a73e8;
  outline: none;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}
.qc-result-inline {
  margin-top: 8px;
  font-size: 14px;
  color: #475569;
}
.qc-result-inline b {
  color: #1a73e8;
  font-size: 16px;
}
.qc-multi-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.qc-scale-section {
  background: #fff3e0;
  border-radius: 6px;
  padding: 8px 12px;
  border: 1px solid #ffcc80;
}
.qc-scale-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #475569;
}
.qc-fill-section {
  background: #f8f9fa;
}
.qc-current-result {
  font-size: 16px;
  color: #475569;
}
.qc-current-result b {
  color: #1a73e8;
  font-size: 20px;
}
.qc-item-select {
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}
.qc-item-select:focus {
  border-color: #1a73e8;
  outline: none;
}
/* ===== END 报价计算器样式 ===== */

/* ==================== P72 通讯录（按组织架构分类） ==================== */
.co-layout { display: flex; gap: 16px; align-items: flex-start; }                    /* P72 新增 */
.co-sidebar { width: 250px; flex-shrink: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; position: sticky; top: 72px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; overflow: hidden; }  /* P78 拆分:顶搜索+按钮(固定),底部门树(滚动) */
.co-sidebar-top { flex-shrink: 0; padding-bottom: 10px; border-bottom: 1px solid #f1f4f8; margin-bottom: 10px; }  /* P78 新增 */
.co-sidebar-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }  /* P78 新增:仅部门树区滚动 */
.co-sidebar-body::-webkit-scrollbar { width: 6px; }  /* P78 新增:细滚动条 */
.co-sidebar-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }  /* P78 新增 */
.co-sidebar-body::-webkit-scrollbar-thumb:hover { background: #9ca3af; }  /* P78 新增 */
.co-search-input { width: 100%; padding: 9px 11px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; outline: none; }  /* P72 新增 */
.co-search-input:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }  /* P72 新增 */
.co-tree { margin-top: 4px; }                                                        /* P78 调整:上方已被 top 隔开 */
.co-tree-item { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: #1f2937; }  /* P72 新增 */
.co-tree-item:hover { background: #f1f5fd; }                                          /* P72 新增 */
.co-tree-item.active { background: #e0eaff; color: #2563eb; font-weight: 600; }       /* P72 新增 */
.co-tree-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* P72 新增 */
.co-tree-count { font-size: 11px; background: #eef2f7; color: #64748b; border-radius: 10px; padding: 1px 7px; flex-shrink: 0; }  /* P72 新增 */
.co-tree-item.active .co-tree-count { background: #2563eb; color: #fff; }             /* P72 新增 */
.co-tree-leader { font-size: 12px; flex-shrink: 0; margin-left: 2px; }                /* P87 新增:部门负责人/禁用角标 */
.co-tree-add-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 10px 0; font-size: 14px; font-weight: 500; border: none; border-radius: 8px; cursor: pointer; transition: all 0.18s; background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25); letter-spacing: 0.5px; }  /* P78 重做:渐变蓝大按钮 */
.co-tree-add-btn:hover { background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35); transform: translateY(-1px); }  /* P78 新增:hover */
.co-tree-add-btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25); }  /* P78 新增 */
.co-tree-add-btn:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; box-shadow: none; transform: none; }  /* P78 改:更明显禁用态 */
.co-main { flex: 1; min-width: 0; }                                                   /* P72 新增 */
.co-group { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 14px; overflow: hidden; }  /* P72 新增 */
.co-group-title { padding: 12px 16px; font-size: 14px; font-weight: 600; background: #f8fafc; border-bottom: 1px solid #eef1f5; display: flex; align-items: center; gap: 8px; }  /* P72 新增 */
.co-group-title .co-count { font-size: 12px; color: #64748b; font-weight: 400; margin-left: auto; }  /* P72 新增 */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }  /* P72 新增 */
.co-card { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f1f4f8; border-right: 1px solid #f1f4f8; }  /* P72 新增 */
.co-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; flex-shrink: 0; }  /* P72 新增 */
.co-info { min-width: 0; flex: 1; }                                                   /* P72 新增 */
.co-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }       /* P72 新增 */
.co-name { font-size: 15px; font-weight: 600; }                                       /* P72 新增 */
.co-role-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }  /* P72 新增 */
.co-sub { font-size: 12.5px; color: #6b7280; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }  /* P72 新增 */
.co-phone { color: #2563eb; text-decoration: none; }                                  /* P72 新增 */
.co-phone:hover { text-decoration: underline; }                                       /* P72 新增 */
.co-muted { color: #c0c6cf; }                                                         /* P72 新增 */
.co-empty { padding: 44px; text-align: center; color: #94a3b8; font-size: 13.5px; }   /* P72 新增 */
.co-search-tip { font-size: 12px; color: #64748b; margin: 4px 2px 0; }                /* P72 新增 */
@media (max-width: 900px) {                                                           /* P72 新增：窄屏左树折叠为横向 */
  .co-layout { flex-direction: column; }
  .co-sidebar { width: 100%; position: static; max-height: 400px; }
  .co-sidebar-body { max-height: 260px; }
}

/* ========================================== P75 IM 消息模块 ========================================== */
.im-tabs { display: flex; gap: 6px; margin: 12px 0 4px; }                              /* P75 新增 */
.im-tab { padding: 7px 16px; border: 1px solid #d1d5db; background: #fff; color: #475569; border-radius: 7px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.im-tab:hover { background: #f9fafb; }
.im-tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.im-badge { background: #ef4444; color: #fff; border-radius: 9px; padding: 1px 7px; font-size: 11px; min-width: 18px; text-align: center; line-height: 1.4; }
.im-toolbar { display: flex; justify-content: flex-end; margin-top: 8px; }
/* P156 消息中心企微化：大气三栏视觉——通栏布局/大头像/蓝底选中会话/白底聊天区/圆角气泡 */
/* P158c：消息页满版贴边（企微式）——主区 padding 清零，会话列表紧贴侧栏，上下左右无缝 */
.main-content.im-full { padding: 0; }
.im-layout { display: flex; height: 100vh; min-height: 0; border: none; border-radius: 0; background: #fff; overflow: hidden; }
/* P158f：企微规格——列表宽 248 / 条目 ~64px 高 / 头像 36 / 名称 14 / 预览 12 */
.im-conv-list { width: 248px; flex-shrink: 0; border-right: 1px solid #e7e7e7; display: flex; flex-direction: column; background: #fff; }
/* 搜索框样式统一在 P158e 段（企微灰胶囊）定义 */
.im-conv-items { flex: 1; overflow-y: auto; }
.im-conv-item { display: flex; gap: 10px; padding: 13px 14px; cursor: pointer; border-bottom: 1px solid #f5f6f7; transition: background .15s; align-items: center; }
.im-conv-item:hover { background: #f5f6f7; }
.im-conv-item.active { background: #D0E4FC; }                 /* P158i 企微选中浅蓝底，文字保持深色 */
.im-conv-avatar { width: 36px; height: 36px; border-radius: 8px; color: #fff; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.im-conv-info { flex: 1; min-width: 0; }
.im-conv-line1 { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.im-conv-name { font-weight: 500; font-size: 14px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.im-conv-unread { background: #fa5151; color: #fff; border-radius: 9px; font-size: 10.5px; font-weight: 600; padding: 0 5px; min-width: 16px; text-align: center; line-height: 1.6; flex-shrink: 0; }
.im-conv-line2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #9ca3af; margin-top: 3px; }
.im-conv-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.im-conv-time { font-size: 11px; color: #b0b3b8; flex-shrink: 0; }
.im-conv-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #f5f6f7; }
.im-pane-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid #f0f0f0; background: #fff; gap: 10px; }
.im-pane-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.im-pane-title strong { font-size: 17px; color: #1f2937; }
.im-pane-meta { font-size: 12.5px; color: #9ca3af; }
.im-pane-actions { display: flex; gap: 6px; flex-shrink: 0; }
.im-members-bar { padding: 7px 22px; border-bottom: 1px solid #f5f6f7; background: #fff; display: flex; flex-wrap: wrap; gap: 6px; max-height: 64px; overflow-y: auto; }
.im-member-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; background: #f5f6f7; border-radius: 12px; font-size: 12px; color: #374151; }
.im-msg-stream { flex: 1; overflow-y: auto; padding: 20px 32px; background: #f5f6f7; }
.im-day-sep { text-align: center; margin: 18px 0 10px; }
.im-day-sep span { background: #f1f2f3; color: #808080; font-size: 12px; padding: 4px 14px; border-radius: 12px; }
.im-msg { display: flex; gap: 10px; margin: 14px 0; align-items: flex-start; }
.im-msg-mine { justify-content: flex-end; }
.im-msg-them { justify-content: flex-start; }
.im-avatar { display: inline-flex; align-items: center; justify-content: center; color: #fff; border-radius: 50%; font-weight: 600; flex-shrink: 0; }
.im-bubble-wrap { max-width: 62%; min-width: 40px; }
.im-msg-sender { font-size: 12px; color: #9ca3af; margin-bottom: 3px; }
.im-bubble { background: #f5f5f5; padding: 11px 15px; border-radius: 4px 14px 14px 14px; color: #1f2937; font-size: 14.5px; line-height: 1.6; word-wrap: break-word; }
.im-msg-mine .im-bubble { background: #3370ff; color: #fff; border-radius: 14px 4px 14px 14px; }
.im-msg-time { font-size: 11px; color: #b0b3b8; margin-top: 4px; padding: 0 4px; }
.im-msg-mine .im-msg-time { text-align: right; }
.im-msg-system { margin: 14px 0; }
.im-sys-bubble { background: #f7f8fa; padding: 9px 16px; border-radius: 8px; color: #475569; font-size: 13px; max-width: 80%; margin: 0 auto; text-align: center; border-left: 3px solid #f59e0b; display: flex; flex-direction: column; gap: 4px; }
.im-sys-text { font-weight: 500; }
.im-sys-ref { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 4px; font-size: 12px; display: inline-block; }
.im-sys-link { color: #3370ff; font-size: 12px; text-decoration: none; }
.im-sys-link:hover { text-decoration: underline; }
.im-input-bar { padding: 12px 22px 16px; border-top: 1px solid #ececee; background: #f5f6f7; position: relative; display: flex; gap: 10px; align-items: flex-end; }
.im-input-bar textarea { flex: 1; border: 1px solid #e5e7eb; border-radius: 10px; padding: 11px 14px; font-size: 14.5px; resize: none; min-height: 46px; max-height: 120px; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.im-input-bar textarea:focus { border-color: #3370ff; box-shadow: 0 0 0 3px rgba(51,112,255,.12); }
.im-input-actions { display: flex; }
.im-mention-pop { position: absolute; bottom: 100%; left: 22px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.12); padding: 4px; min-width: 180px; max-height: 200px; overflow-y: auto; z-index: 10; }
.im-mention-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer; border-radius: 6px; font-size: 13px; }
.im-mention-item:hover { background: #eff6ff; }
.im-welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; text-align: center; color: #9ca3af; }
.im-list-pane { flex: 1; overflow-y: auto; padding: 14px; }
.im-todo-card, .im-notif-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start; }
.im-todo-card { flex-direction: column; }
.im-todo-bubble { font-size: 14px; color: #1f2937; }
.im-todo-content { font-size: 13px; color: #6b7280; margin-top: 4px; }
.im-todo-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.im-notif-card { transition: background .15s; }
.im-notif-card:hover { background: #f9fafb; }
.im-notif-card.unread { border-left: 3px solid #2563eb; }
.im-notif-icon { font-size: 26px; flex-shrink: 0; }
.im-notif-title { font-size: 14px; font-weight: 600; color: #1f2937; }
.im-am-list { padding: 4px; }
.im-am-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f3f4f6; }
.im-am-row:hover { background: #f9fafb; }
.im-am-row:last-child { border-bottom: none; }
.im-empty { padding: 44px; text-align: center; color: #94a3b8; font-size: 13.5px; }
.co-card-edit { background: transparent; border: 1px solid #e5e7eb; border-radius: 4px; padding: 2px 7px; cursor: pointer; color: #64748b; font-size: 12px; margin-left: auto; }
.co-card-edit:hover { background: #f3f4f6; color: #2563eb; }
@media (max-width: 800px) {                                                           /* P75 新增：窄屏会话列表与聊天区上下分 */
  .im-layout { flex-direction: column; height: auto; }
  .im-conv-list { width: 100%; max-height: 220px; border-right: none; border-bottom: 1px solid #e5e7eb; }
  .im-conv-pane { min-height: 400px; }
}

/* ========== P77 侧栏分组(拖动/编辑/分组管理面板) ========== */
.nav-section { margin-bottom: 4px; }
.nav-section.dragging { opacity: 0.5; }
.nav-section.drop-target {
  border-top: 3px solid #2563eb;
  background: linear-gradient(180deg, rgba(37,99,235,0.05) 0%, transparent 60%);
  padding-top: 4px;
}
.nav-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-light, #86909c);
  text-transform: none;
  cursor: default;
  user-select: none;
}
.nav-section-label[ondblclick] { cursor: text; }
.nav-section-label[draggable="true"], .nav-section[draggable="true"] .nav-section-label { cursor: grab; }
.nav-section-label[draggable="true"]:active, .nav-section[draggable="true"] .nav-section-label:active { cursor: grabbing; }
.nav-section-icon { font-size: 13px; }
.nav-section-name { flex: 1; }
.nav-section-edit { font-size: 11px; color: #cbd5e1; opacity: 0; transition: opacity 0.15s; cursor: pointer; }
.nav-section-label:hover .nav-section-edit { opacity: 1; }
.nav-item.dragging { opacity: 0.4; }
.nav-item { cursor: default; }
.nav-item[draggable="true"] { cursor: grab; }
.nav-item[draggable="true"]:active { cursor: grabbing; }

/* P85: 移除"添加分组/隐藏分组"相关样式（固定 3 类,不再需要） */
/* ========== P77 分组管理面板(sg-*) ========== */
.sg-panel { display: flex; flex-direction: column; gap: 14px; }
.sg-group { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; transition: all 0.15s; }
.sg-group.drop-target { border: 2px dashed #2563eb; background: #eff6ff; }
.sg-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.sg-name-input { font-weight: 600; flex: 1; min-width: 120px; }
.sg-icon-input { text-align: center; font-size: 16px; }
.sg-items { list-style: none; padding: 0; margin: 0; min-height: 28px; }
.sg-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; margin-bottom: 4px; cursor: grab; }
.sg-item:active { cursor: grabbing; }
.sg-item:hover { border-color: #cbd5e1; }
.sg-drag { color: #cbd5e1; cursor: grab; font-weight: 700; }
.sg-item-name { flex: 1; font-size: 13px; color: #334155; }
.sg-system-tag { font-size: 13px; color: #94a3b8; padding: 4px; }
.sg-add-sel { font-size: 13px; }


/* ==================== P88：报价单弹窗 UI 优化（简洁大气 · 低饱和商务蓝） ==================== */
/* 弹窗框架：16px 圆角 */
.modal-content.quote-modal { border-radius: 16px !important; }
/* 顶部导航栏：低饱和商务蓝（不高饱和亮蓝） */
.quote-modal .modal-header {
  background: linear-gradient(135deg, #4d6db3 0%, #3d5a99 100%) !important;
}
/* 关闭按钮：图标按钮 + hover 浮起 */
.quote-modal .modal-close {
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  font-size: 14px; line-height: 1; transition: all .2s;
}
.quote-modal .modal-close:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }
/* 内部分区卡片：12px 圆角、浅色分隔（不用生硬分割线） */
.quote-modal .form-section {
  background: #fff; border: 1px solid #edf0f5; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
}
.quote-modal .form-section-title {
  border-bottom: none; font-size: 14px; color: #3d5a99; font-weight: 600;
  padding-bottom: 0; margin-bottom: 12px;
}
/* ---- 模板选择区 ---- */
.q-tpl-section { background: #fafbfd !important; }
.q-tpl-section-title { justify-content: space-between; }
.q-tpl-library-btn {
  background: #fff; border: 1px solid #d4dbe7; color: #3d5a99;
  border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: 12px;
  transition: all .2s;
}
.q-tpl-library-btn:hover { border-color: #3d5a99; box-shadow: 0 2px 6px rgba(61,90,153,.12); }
.q-template-picker {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 2px;
}
.q-template-card {
  cursor: pointer; background: #fff; border: 2px solid #e8ecf2; border-radius: 12px;
  padding: 8px; text-align: center; display: flex; flex-direction: column; gap: 3px;
  align-items: center; transition: all .2s; position: relative;
}
.q-template-card input { display: none; }
.q-template-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(31,41,55,.08); border-color: #cbd5e1; }
.q-tpl-thumb {
  width: 100%; height: 44px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 2px;
}
.q-tpl-thumb-custom { border: 1.5px dashed #d97706; background: linear-gradient(135deg,#fdf3e3,#f3dfb6) !important; }
.q-tpl-thumb-icon { font-size: 18px; }
.q-tpl-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.q-tpl-desc { font-size: 11px; color: #9aa3af; }
/* 选中态：2px 细主题色边框 + 极淡底色（不要大块深色填充） */
.q-template-card.selected { border-color: #3b6fd4; background: #f2f6fd; }
.q-template-card.selected[data-template="xiaomi"] { border-color: #37474f; background: #f3f4f5; }
.q-template-card.selected[data-template="luxury"] { border-color: #b08d3e; background: #faf6ec; }
.q-template-card.selected[data-template="fresh"]  { border-color: #6a9a6d; background: #f2f7f2; }
.q-template-card.selected[data-template="custom"] { border-color: #d97706; background: #fdf6ec; border-style: solid; }
.q-template-card.q-template-custom { border-style: dashed; }
.q-template-card.q-template-custom.selected { border-style: solid; }
/* ---- Tab 栏：纯文字 + 底部细高亮线，白底 ---- */
.quote-edit-tabs {
  display: flex; gap: 4px; margin: 4px 0 14px; background: #fff;
  border-bottom: 1px solid #e8ecf2; padding: 0 6px;
}
.qet-tab {
  padding: 9px 18px; border: none; background: none; font-size: 14px;
  font-weight: 500; cursor: pointer; color: #6b7280; position: relative;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s;
}
.qet-tab:hover { color: #3d5a99; }
.qet-tab.active { color: #3d5a99; font-weight: 600; border-bottom-color: #3d5a99; }
/* ---- 表单：标签加粗在上（P79e 白底蓝边小标签已全局生效，这里补字段块间距） ---- */
.q-field-label { font-weight: 600; font-size: 13px; color: #1f2937; margin-bottom: 6px; }
.q-cover-block { margin-top: 14px; }
/* ---- 封面图：简约虚线占位框 ---- */
.cover-image-row { display: flex; gap: 14px; align-items: center; }
.q-cover-box {
  width: 240px; height: 108px; flex: 0 0 auto;
  border: 1.5px dashed #c4ccd8; border-radius: 10px;
  background-color: #fafbfd; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; cursor: default;
  transition: border-color .2s;
}
.q-cover-box:hover { border-color: #3d5a99; }
.q-cover-box.has-img { border-style: solid; border-color: #e8ecf2; }
.q-cover-box.has-img .q-cover-empty { display: none; }
.q-cover-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #9aa3af; font-size: 12px;
}
.q-cover-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.q-cover-btn {
  background: #fff; border: 1px solid #3d5a99; color: #3d5a99;
  border-radius: 8px; padding: 5px 14px; cursor: pointer; font-size: 12px;
  transition: all .2s;
}
.q-cover-btn:hover { background: #f2f6fd; box-shadow: 0 2px 6px rgba(61,90,153,.12); }
.q-cover-tip { font-size: 11px; color: #9aa3af; }
/* ---- 案例与产品区：浅色卡片 ---- */
.q-case-section { background: #fafbfd !important; }
/* ---- 底部按钮：预览按钮突出主题色 ---- */
.quote-modal .modal-footer .q-preview-btn {
  background: #fff; border: 1.5px solid #3d5a99; color: #3d5a99;
  border-radius: 8px; font-weight: 600; transition: all .2s;
}
.quote-modal .modal-footer .q-preview-btn:hover {
  background: #f2f6fd; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(61,90,153,.15);
}
@media (max-width: 900px) {
  .q-template-picker { grid-template-columns: repeat(3, 1fr); }
  .cover-image-row { flex-direction: column; align-items: stretch; }
  .q-cover-box { width: 100%; }
}

/* ==================== P90 报价单列表页 B 方案（轻度重构） ==================== */
/* 设计 token：主色 #2B65D9 / 页面底 #F2F4F7 / 卡片 #FFF / 圆角 12-10-8 / 阴影 0 1px 3px rgba(0,0,0,.06) */

/* ---- 1. 顶部统计卡片 ---- */
.quote-stats-bar { display: flex; gap: 16px; margin-bottom: 20px; }
.quotes-page .qs-card {
  flex: 1; background: #fff; border: none; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 18px 20px; text-align: left;
  transition: box-shadow .15s;
}
.quotes-page .qs-card:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); }
.quotes-page .qs-num { font-size: 26px; font-weight: 600; color: #2B65D9; line-height: 1.2; }
.quotes-page .qs-label { font-size: 12px; color: #86909C; margin-top: 5px; }

/* ---- 2. 搜索 + 操作工具栏（flex 左右分栏） ---- */
.qt-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.qt-search {
  height: 40px; padding: 0 14px; flex: 1; min-width: 220px; max-width: 420px;
  border: 1px solid #E5E6EB; border-radius: 8px; background: #fff;
  font-size: 13px; color: #1D2129; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.qt-search:focus { border-color: #2B65D9; box-shadow: 0 0 0 3px rgba(43, 101, 217, 0.12); }
.qt-search::placeholder { color: #A9AEB8; }
.qt-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 按钮统一 40px 高、圆角 8px */
.qt-btn-primary, .qt-btn-ghost, .qt-btn-danger {
  height: 40px; padding: 0 18px; border-radius: 8px; font-size: 13px;
  cursor: pointer; border: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.qt-btn-primary { background: #2B65D9; color: #fff; font-weight: 500; }
.qt-btn-primary:hover { background: #2456BC; }
.qt-btn-ghost { background: #fff; color: #4E5969; border: 1px solid #E5E6EB; }
.qt-btn-ghost:hover { border-color: #C9CDD4; background: #F7F8FA; }
.qt-btn-danger { background: #fff; color: #D93026; border: 1px solid #F2C1BE; }
.qt-btn-danger:hover { background: #FDF3F2; }
.qt-btn-sm { height: 32px; padding: 0 14px; font-size: 12px; }

/* ---- 批量操作条（勾选后浮现） ---- */
.qt-batch-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 10px 16px;
  background: #fff; border: 1px solid #E8F0FE; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.qt-batch-count { font-size: 13px; color: #2B65D9; font-weight: 600; margin-right: auto; }

/* ---- 3. 报价单列表条目（三栏 flex：信息｜金额｜操作） ---- */
.quote-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.quote-card.qt-card {
  display: flex; align-items: center; gap: 20px;
  background: #fff; border: none; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 16px 20px; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.quote-card.qt-card:hover { background: #F7F8FA; border: none; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
/* P90：选中态不再用蓝色粗边框，仅淡底色 */
.quote-card.qt-card.q-selected { background: #E8F0FE; }
.quote-card.qt-card.q-selected:hover { background: #E8F0FE; }
.qt-card .compare-cb { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; accent-color: #2B65D9; }

/* 左侧信息区 */
.qt-info { flex: 1; min-width: 0; }
.qt-title {
  font-weight: 600; font-size: 15px; color: #1D2129;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qt-meta { font-size: 12px; color: #86909C; margin-top: 5px; }

/* 中间金额区（垂直居中） */
.qt-amount {
  font-size: 18px; font-weight: 600; color: #1D2129;
  white-space: nowrap; flex-shrink: 0; align-self: center;
}
.qt-amount.is-draft { color: #FA8C16; }

/* 右侧操作区：状态标签 + 按钮组 纵向排布 */
.qt-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  flex-shrink: 0;
}
.qt-right .quote-status { border-radius: 6px; font-size: 12px; padding: 2px 10px; border: none; }
.quote-status-sent { background: #E8F0FE; color: #2B65D9; }
.quote-status-draft { background: #FFF3E0; color: #FA8C16; }
.quote-status-viewed { background: #E8F6EC; color: #4C9B62; }
.quote-status-expired { background: #F2F3F5; color: #86909C; }
.qt-right .quote-actions { display: flex; gap: 8px; align-items: center; }

/* 分享按钮：蓝描边幽灵态，hover 填充 */
.qt-share-btn {
  height: 30px; padding: 0 14px; border-radius: 8px; font-size: 12px;
  background: #fff; color: #2B65D9; border: 1px solid #2B65D9; cursor: pointer;
  transition: background .15s, color .15s; font-family: inherit;
}
.qt-share-btn:hover { background: #2B65D9; color: #fff; }

/* 更多… 图标按钮 + 下拉菜单 */
.qt-menu-wrap { position: relative; display: inline-block; }
.qt-more-btn {
  height: 30px; min-width: 34px; padding: 0 8px; border-radius: 8px; font-size: 14px;
  background: #fff; color: #4E5969; border: 1px solid #E5E6EB; cursor: pointer;
  transition: background .15s, border-color .15s; font-family: inherit; line-height: 1;
}
.qt-more-btn:hover { background: #F7F8FA; border-color: #C9CDD4; }
.qt-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid #E5E6EB; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  min-width: 150px; z-index: 60; overflow: hidden; padding: 4px;
}
.qt-menu-item {
  padding: 9px 12px; display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; color: #1D2129; border-radius: 6px;
}
.qt-menu-item:hover { background: #F2F4F7; }
.qt-menu-item span { font-size: 14px; }
.qt-menu-danger { color: #D93026; }
.qt-menu-danger:hover { background: #FDF3F2; }
.qt-menu-divider { height: 1px; background: #F2F3F5; margin: 4px 6px; }

/* ---- 4. 空状态兜底 ---- */
.qt-empty {
  margin-top: 20px; background: #fff; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 64px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.qt-empty-text { font-size: 14px; color: #86909C; }
.qt-empty .qt-btn-primary { margin-top: 4px; }

/* ---- 5. 响应式：小屏三栏降级，金额下沉到左侧信息区下方 ---- */
@media (max-width: 720px) {
  .qt-card { flex-wrap: wrap; row-gap: 10px; }
  .qt-info { flex: 1 1 100%; order: 1; }
  .qt-amount { order: 2; align-self: flex-start; }
  .qt-right { order: 3; flex-direction: row; align-items: center; margin-left: auto; gap: 12px; }
  .quote-stats-bar { flex-direction: column; gap: 10px; }
  .qt-toolbar { flex-direction: column; align-items: stretch; }
  .qt-search { max-width: none; }
  .qt-actions { justify-content: flex-end; }
}

/* ==================== P93 工作台 v2：左右分栏（左 420px 风险中心 + 右三模块） ==================== */
.wb-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; }
.wb-filter-label { font-weight: 600; font-size: 13px; color: var(--text-main, #1e293b); }
.wb-range-btns { display: flex; gap: 6px; }
.wb-range-btn { border: 1px solid var(--border, #e5e7eb); background: #fff; color: var(--text-light, #64748b); border-radius: 6px; padding: 5px 14px; font-size: 13px; cursor: pointer; transition: all .15s; }
.wb-range-btn:hover { border-color: var(--blue, #2B65D9); color: var(--blue, #2B65D9); }
.wb-range-btn.active { background: var(--blue, #2B65D9); border-color: var(--blue, #2B65D9); color: #fff; }
.wb-custom-range { display: inline-flex; align-items: center; gap: 6px; }
.wb-custom-range .form-control { width: 140px; padding: 4px 8px; font-size: 13px; }
.wb-range-text { margin-left: auto; font-size: 12px; color: var(--text-light, #94a3b8); }

.wb-layout { display: flex; gap: 16px; align-items: flex-start; }
.wb-left { width: 420px; min-width: 420px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.wb-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* 风险指标卡片组：4 张横向平铺 */
.wb-risk-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wb-risk-card { border-radius: 10px; padding: 12px 8px; text-align: center; cursor: pointer; border: 1px solid rgba(0,0,0,0.04); transition: transform .12s, box-shadow .12s; }
.wb-risk-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.wb-risk-num { font-size: 26px; font-weight: 800; line-height: 1.2; }
.wb-risk-label { font-size: 12px; color: var(--text-light, #64748b); margin-top: 2px; }

/* 风险明细列表：表头固定 + 内部滚动 */
.wb-risk-panel { padding: 12px 14px; }
.wb-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.wb-risk-scroll { max-height: calc(100vh - 420px); min-height: 260px; overflow-y: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; }
.wb-risk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wb-risk-table thead th { position: sticky; top: 0; background: #f8fafc; z-index: 2; padding: 8px 8px; text-align: left; font-weight: 600; color: var(--text-light, #64748b); border-bottom: 1px solid var(--border, #e5e7eb); white-space: nowrap; }
.wb-risk-table tbody td { padding: 8px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.wb-row-red { background: #fff5f5; }
.wb-row-yellow { background: #fffdf0; }
.wb-row-green { background: #fff; }
.wb-tag-yellow { background: #fff7e6; color: #ca8a04; }
.wb-tag-normal { background: #f1f5f9; color: #64748b; }
.wb-err { background: #fff1f0; border-left: 3px solid var(--red, #dc2626); color: var(--red, #dc2626); font-size: 12.5px; padding: 8px 12px; border-radius: 6px; margin-bottom: 8px; }

/* 我的待办 */
.wb-todo-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #f1f5f9; }
.wb-todo-item:last-child { border-bottom: none; }
.wb-todo-main { flex: 1; min-width: 0; }
.wb-todo-title { font-weight: 600; font-size: 13.5px; color: var(--text-main, #1e293b); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wb-todo-meta { font-size: 12px; color: var(--text-light, #94a3b8); margin-top: 3px; }

/* 最近工地动态 */
.wb-ev-item { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid #f1f5f9; }
.wb-ev-item:last-child { border-bottom: none; }
.wb-ev-time { min-width: 74px; font-size: 12px; color: var(--text-light, #94a3b8); }
.wb-ev-main { flex: 1; min-width: 0; }
.wb-ev-title { font-size: 13px; font-weight: 600; color: var(--text-main, #1e293b); }
.wb-ev-desc { font-size: 12.5px; color: var(--text-light, #64748b); margin-top: 2px; }

/* 快捷操作：大卡片一行 4 个自适应换行 */
.wb-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wb-quick-card { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 16px 8px; text-align: center; cursor: pointer; transition: all .15s; background: #fff; }
.wb-quick-card:hover { border-color: var(--blue, #2B65D9); background: #f5f8ff; transform: translateY(-2px); }
.wb-quick-icon { font-size: 26px; }
.wb-quick-label { font-size: 12.5px; color: var(--text-main, #1e293b); margin-top: 6px; font-weight: 600; }

/* 告警处理弹窗回显 */
.wb-alarm-info { background: #f8fafc; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; display: flex; flex-direction: column; gap: 7px; }
.wb-info-label { display: inline-block; min-width: 74px; color: var(--text-light, #94a3b8); }

/* 工地管理筛选 chips（P93 下钻） */
.wb-filter-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wb-filter-chip { display: inline-flex; align-items: center; gap: 6px; background: #e8f0fe; color: #2B65D9; border-radius: 14px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.wb-chip-x { cursor: pointer; font-size: 11px; opacity: .7; }
.wb-chip-x:hover { opacity: 1; }

@media (max-width: 1280px) {
  .wb-layout { flex-direction: column; }
  .wb-left { width: 100%; min-width: 0; }
  .wb-risk-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .wb-risk-cards { grid-template-columns: repeat(2, 1fr); }
  .wb-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== P94 通讯录二期：三栏 / 表格 / 批量条 / 抽屉 / 班组 ==================== */
.co-tree-group-title { font-size: 11px; font-weight: 600; color: #94a3b8; letter-spacing: 1px; padding: 10px 8px 4px; border-top: 1px dashed #eef2f7; margin-top: 8px; }
.co-tree-item.co-tree-team { color: #0f766e; }
.co-tree-item.co-tree-team.active { background: #d8f3ef; color: #0f766e; }
.co-tree-item.co-tree-team.active .co-tree-count { background: #0f766e; color: #fff; }
.co-tree-team-add { text-align: center; font-size: 12.5px; color: #2B65D9; padding: 7px 0 2px; cursor: pointer; }
.co-tree-team-add:hover { text-decoration: underline; }
.co-tree-empty { font-size: 12px; color: #94a3b8; padding: 6px 8px; }
.co-link { color: #2B65D9; cursor: pointer; }

.co-side-btns { display: flex; gap: 6px; margin-top: 8px; }
.co-side-btn { flex: 1; padding: 7px 0; font-size: 12.5px; border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; cursor: pointer; color: #374151; transition: all .15s; }
.co-side-btn:hover { border-color: #2B65D9; color: #2B65D9; background: #f0f5ff; }
.co-only-active { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #475569; margin-top: 10px; cursor: pointer; user-select: none; }

.co-toolbar { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px 10px 0 0; padding: 10px 14px; border-bottom: none; }
.co-toolbar-title { font-size: 14.5px; font-weight: 600; color: #1f2937; }
.co-toolbar-sub { font-size: 12px; font-weight: 400; color: #94a3b8; margin-left: 6px; }
.co-toolbar-right { display: flex; align-items: center; gap: 10px; }
.co-view-switch { display: inline-flex; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.co-view-switch button { border: none; background: #fff; padding: 6px 14px; font-size: 12.5px; cursor: pointer; color: #64748b; }
.co-view-switch button.active { background: #2B65D9; color: #fff; }

.co-batch-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #eef4ff; border: 1px solid #c4d7fb; border-bottom: none; padding: 8px 14px; font-size: 13px; }
.co-batch-count { color: #1e40af; }
.co-batch-count b { font-size: 15px; }
.co-batch-btn { border: 1px solid #c4d7fb; background: #fff; color: #1e40af; border-radius: 6px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
.co-batch-btn:hover { background: #dbe8ff; }
.co-batch-btn.co-batch-danger { color: #dc2626; border-color: #fecaca; }
.co-batch-btn.co-batch-danger:hover { background: #fee2e2; }
.co-batch-cancel { margin-left: auto; border: none; background: transparent; color: #64748b; cursor: pointer; font-size: 12.5px; text-decoration: underline; }

.co-table-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 0 0 10px 10px; overflow-x: auto; }
.co-toolbar + .co-batch-bar + .co-table-wrap, .co-toolbar + .co-table-wrap { border-top: none; }
.co-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 860px; }
.co-table thead th { text-align: left; padding: 9px 10px; background: #f8fafc; color: #64748b; font-weight: 600; font-size: 12px; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.co-table tbody td { padding: 9px 10px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; color: #1f2937; }
.co-table tbody tr:last-child td { border-bottom: none; }
.co-table tbody tr:hover { background: #f7faff; }
.co-table-empty { padding: 40px; text-align: center; color: #94a3b8; font-size: 13px; }
.co-row { cursor: grab; }
.co-td-cb { width: 34px; text-align: center; }
.co-td-ops { width: 130px; white-space: nowrap; }
.co-cell-user { display: flex; align-items: center; gap: 10px; }
.co-cell-name { font-weight: 600; white-space: nowrap; }
.co-cell-sub { font-size: 12px; color: #94a3b8; margin-top: 1px; }
.co-me { font-size: 11px; color: #2B65D9; font-weight: 400; }
.co-op { border: 1px solid #e5e7eb; background: #fff; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 13px; margin-right: 4px; }
.co-op:hover { border-color: #2B65D9; background: #f0f5ff; }
.co-op.co-op-danger:hover { border-color: #dc2626; background: #fef2f2; }
.co-site-chip { display: inline-flex; align-items: center; background: #eef4ff; color: #1e40af; border-radius: 5px; padding: 2px 7px; font-size: 11.5px; margin: 1px 3px 1px 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-site-chip.co-site-done { background: #f1f5f9; color: #94a3b8; }
.co-site-more { font-size: 11.5px; color: #2B65D9; cursor: default; }
.co-st { display: inline-block; font-size: 11.5px; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.co-st-on { background: #dcfce7; color: #15803d; }
.co-st-off { background: #fee2e2; color: #dc2626; }
.co-st-pending { background: #fef3c7; color: #b45309; }

/* 人员详情抽屉（右栏） */
.co-drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .25); z-index: 1000; }
.co-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw; background: #fff; box-shadow: -8px 0 24px rgba(15, 23, 42, .12); z-index: 1001; display: flex; flex-direction: column; animation: coDrawerIn .18s ease; }
@keyframes coDrawerIn { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.co-drawer-header { display: flex; align-items: center; justify-content: space-between; background: #2B65D9; color: #fff; padding: 13px 16px; font-size: 14.5px; }
.co-drawer-header .modal-close { color: #fff; }
.co-drawer-tabs { display: flex; border-bottom: 1px solid #eef2f7; padding: 0 8px; background: #fff; }
.co-drawer-tab { flex: 1; border: none; background: transparent; padding: 11px 4px; font-size: 13px; color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; }
.co-drawer-tab.active { color: #2B65D9; font-weight: 600; border-bottom-color: #2B65D9; }
.co-drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.co-drawer-profile { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #f1f4f8; margin-bottom: 12px; }
.co-drawer-name { font-size: 17px; font-weight: 700; }
.co-drawer-sub { margin-top: 4px; }
.co-drawer-rows { background: #f8fafc; border-radius: 10px; padding: 4px 14px; margin-bottom: 12px; }
.co-drawer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #e8edf3; font-size: 13px; }
.co-drawer-row:last-child { border-bottom: none; }
.co-drawer-row span { color: #94a3b8; flex-shrink: 0; }
.co-drawer-row b { font-weight: 500; text-align: right; word-break: break-all; }
.co-drawer-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.co-drawer-tip { background: #f0f5ff; border: 1px dashed #c4d7fb; border-radius: 8px; padding: 9px 12px; font-size: 12px; color: #1e40af; line-height: 1.6; margin-bottom: 12px; }
.co-drawer-empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 26px 0; }
.co-site-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 10px; margin-bottom: 8px; }
.co-site-name { font-weight: 600; font-size: 13.5px; }

/* ==================== P159 企微式通讯录三栏（分类 / 列表 / 详情） ==================== */
.co3-layout { display: flex; height: 100vh; min-height: 0; background: #fff; overflow: hidden; }

/* 第 1 栏：分类 */
.co3-cats { width: 208px; flex-shrink: 0; background: #fff; border-right: 1px solid #e7e7e7; display: flex; flex-direction: column; }
.co3-cats-search { padding: 10px 12px 8px; }
.co3-search { width: 100%; padding: 7px 10px 7px 28px; border: none; background: #f2f3f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cline x1='20.5' y1='20.5' x2='16' y2='16'/%3E%3C/svg%3E") no-repeat 9px center / 13px 13px; border-radius: 8px; font-size: 13px; outline: none; color: #1f2937; }
.co3-search::placeholder { color: #9ca3af; }
.co3-search:focus { background-color: #eceded; }
.co3-cats-body { flex: 1; overflow-y: auto; padding: 4px 8px; }
.co3-cat { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; transition: background .15s; margin-bottom: 2px; }
.co3-cat:hover { background: #f0f5fd; }
.co3-cat.active { background: #D0E4FC; }
.co3-cat-icon { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; color: #fff; }
.co3-cat-name { flex: 1; font-size: 14px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co3-cat.active .co3-cat-name { color: #1d4ed8; font-weight: 500; }
.co3-cat-n { font-size: 12px; color: #94a3b8; flex-shrink: 0; }
.co3-cats-foot { padding: 8px 10px 12px; border-top: 1px solid #f1f2f5; display: flex; flex-direction: column; gap: 4px; }
.co3-add-btn { width: 100%; text-align: left; border: none; background: transparent; color: #64748b; font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.co3-add-btn:hover { background: #f0f5fd; color: #2563eb; }

/* 第 2 栏：列表 */
.co3-list { width: 288px; flex-shrink: 0; background: #fff; border-right: 1px solid #e7e7e7; display: flex; flex-direction: column; overflow: hidden; }
.co3-list-title { padding: 13px 16px 6px; font-size: 13px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.co3-list-n { font-size: 12px; color: #b0b7c0; margin-left: 4px; }
.co3-rows { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.co3-dept-row { display: flex; align-items: center; gap: 6px; padding: 7px 12px; cursor: pointer; font-size: 13.5px; color: #1f2937; border-radius: 0; }
.co3-dept-row:hover { background: #f5f6f7; }
.co3-chev { width: 12px; font-size: 10px; color: #94a3b8; flex-shrink: 0; text-align: center; }
.co3-row-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co3-row-n { font-size: 12px; color: #b0b7c0; flex-shrink: 0; }
.co3-list-sep { padding: 12px 16px 4px; font-size: 12px; color: #94a3b8; }
.co3-person-row { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; transition: background .12s; }
.co3-person-row:hover { background: #f5f6f7; }
.co3-person-row.active { background: #D0E4FC; }
.co3-person-row[data-off="1"] { opacity: .55; }
.co3-avatar { width: 34px; height: 34px; border-radius: 8px; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex-shrink: 0; object-fit: cover; }
.co3-person-name { font-size: 14px; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 110px; }
.co3-person-sub { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.co3-tag-me { display: inline-block; font-size: 10px; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 4px; padding: 0 4px; line-height: 16px; vertical-align: 1px; }
.co3-tag-off { display: inline-block; font-size: 10px; color: #dc2626; background: #fee2e2; border-radius: 4px; padding: 0 5px; line-height: 16px; flex-shrink: 0; }
.co3-cust-badge { font-size: 10.5px; border: 1px solid; border-radius: 999px; padding: 0 7px; line-height: 17px; flex-shrink: 0; white-space: nowrap; }
.co3-empty { padding: 40px 16px; text-align: center; color: #b0b7c0; font-size: 13px; }

/* 第 3 栏：详情 */
.co3-detail { flex: 1; min-width: 0; background: #f5f6f7; overflow-y: auto; display: flex; flex-direction: column; }
.co3-blank { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px; }
.co3-blank .im-welcome-lockup { gap: 18px; }
.co3-blank .im-welcome-logo { width: 64px; height: 64px; }
.co3-blank .im-welcome-name { font-size: 26px; }
.co3-blank-hint { color: #b0b7c0; font-size: 13px; }
.co3-pane { max-width: 760px; width: 100%; margin: 0 auto; padding: 36px 40px; }
.co3-profile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0 4px; }
.co3-big-avatar { width: 72px; height: 72px; border-radius: 14px; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 600; object-fit: cover; }
.co3-profile-name { font-size: 20px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.co3-profile-role { font-size: 13px; color: #94a3b8; }
.co3-info-list { background: #fff; border-radius: 12px; margin-top: 22px; overflow: hidden; border: 1px solid #edf0f3; }
.co3-info-row { display: flex; align-items: center; gap: 16px; padding: 13px 20px; border-bottom: 1px solid #f1f4f8; font-size: 14px; }
.co3-info-row:last-child { border-bottom: none; }
.co3-info-k { width: 72px; flex-shrink: 0; color: #94a3b8; font-size: 13px; }
.co3-info-v { color: #1f2937; min-width: 0; word-break: break-word; }
.co3-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.co3-msg-btn { min-width: 132px; }

/* 客户：签约后服务五阶段 */
.co3-stage-title2 { font-size: 14px; font-weight: 600; color: #334155; margin: 26px 0 12px; }
.co3-stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.co3-stage-card { background: #fff; border: 1px solid #edf0f3; border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.co3-stage-head { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.co3-stage-icon { width: 38px; height: 38px; border-radius: 10px; background: #eff6ff; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.co3-stage-main { min-width: 0; }
.co3-stage-title { font-size: 14px; font-weight: 600; color: #0f172a; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.co3-stage-badge { font-size: 11px; border: 1px solid; border-radius: 999px; padding: 0 7px; line-height: 17px; font-weight: 400; white-space: nowrap; }
.co3-stage-desc { font-size: 12px; color: #94a3b8; margin-top: 3px; line-height: 1.5; }
.co3-stage-card .btn { flex-shrink: 0; }

/* 机器人问答 */
.co3-pane-robot { display: flex; flex-direction: column; max-width: none; height: 100vh; padding: 18px 0 0; }
.co3-robot-head { display: flex; align-items: center; gap: 14px; padding: 4px 24px 12px; border-bottom: 1px solid #e8ebef; }
.co3-robot-head .co3-big-avatar { width: 48px; height: 48px; border-radius: 12px; font-size: 22px; }
.co3-pane-robot .im-qa-box { background: #fafbfc; border: 1px solid #e2e8f0; border-radius: 12px; }

/* 窄屏：三栏堆叠（列表优先） */
@media (max-width: 900px) {
  .co3-cats { width: 150px; }
  .co3-list { width: 220px; }
  .co3-stage-grid { grid-template-columns: 1fr; }
}
.co-site-sub { margin-top: 4px; }
.co-perm-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 300px; overflow-y: auto; }
.co-perm-chip { background: #f1f5f9; color: #475569; border-radius: 5px; padding: 3px 8px; font-size: 11.5px; font-family: ui-monospace, monospace; }

/* 班组管理 */
.co-team-add-row { display: flex; gap: 8px; margin-bottom: 10px; }
.co-team-add-row .form-control { flex: 1; }
.co-team-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 10px; margin-bottom: 8px; }
.co-team-name { font-weight: 600; font-size: 13.5px; }
.co-team-count { font-size: 11.5px; color: #64748b; background: #f1f5f9; border-radius: 9px; padding: 1px 8px; margin-left: 6px; font-weight: 400; }
.co-team-ops { white-space: nowrap; }
.co-tip { background: #f8fafc; border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #64748b; line-height: 1.6; margin-top: 10px; }
.co-imp-sites { max-height: 150px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; }
.co-site-pick { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 3px 0; color: #374151; cursor: pointer; }
.co-sms-pick { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: #475569; margin-top: 10px; cursor: pointer; line-height: 1.5; }

@media (max-width: 720px) {
  .co-drawer { width: 100vw; max-width: 100vw; }
  .co-batch-bar { font-size: 12px; }
}
/* ==================== /P94 通讯录 ==================== */
/* ==================== P94-C 消息模块（工地会话 / 业务卡片 / 待办通知改造） ==================== */
.im-conv-mark { display: inline-block; font-size: 10.5px; line-height: 1; padding: 3px 6px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.im-mark-frozen { background: #eef2f6; color: #64748b; }
.im-mark-paused { background: #fef3c7; color: #b45309; }
.im-mark-active { background: #e6f4f1; color: #0f766e; }

/* 工地会话状态徽标 / 横幅 */
.im-site-chip { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 1px; }
.im-sc-active { background: #e6f4f1; color: #0f766e; }
.im-sc-paused { background: #fef3c7; color: #b45309; }
.im-sc-frozen { background: #eef2f6; color: #64748b; }
.im-site-banner { padding: 9px 14px; font-size: 12.5px; border-left: 3px solid; }
.im-banner-frozen { background: #f6f8fa; color: #64748b; border-color: #94a3b8; }
.im-banner-paused { background: #fffbeb; color: #b45309; border-color: #f59e0b; }
.im-frozen-note { padding: 18px; text-align: center; color: #94a3b8; background: #f6f8fa; font-size: 13px; border-top: 1px solid #eef2f6; }

/* 成员条：工地会话成员可点击 + 同步提示 */
.im-member-click { cursor: pointer; }
.im-member-click:hover { background: #eef4ff; border-color: #c7d8f7; }
.im-members-tip { font-size: 11px; color: #94a3b8; padding: 2px 8px; white-space: nowrap; align-self: center; }

/* 业务快捷工具栏 */
.im-quick-bar { display: flex; gap: 8px; padding: 8px 12px 0; flex-wrap: wrap; border-top: 1px solid #eef2f6; background: #fafbfd; }
.im-quick-btn { border: 1px solid #dbe4f0; background: #fff; color: #2B65D9; font-size: 12px; padding: 5px 10px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.im-quick-btn:hover { background: #eef4ff; border-color: #2B65D9; }

/* 业务卡片消息 */
.im-biz-card { min-width: 220px; max-width: 360px; background: #fff; border: 1px solid #e3e8ef; border-left: 3px solid var(--biz-color, #2B65D9); border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.im-biz-head { font-size: 11.5px; color: var(--biz-color, #2B65D9); font-weight: 600; letter-spacing: .5px; display: flex; align-items: center; gap: 4px; }
.im-biz-title { font-size: 13.5px; font-weight: 600; color: #1e293b; margin-top: 6px; line-height: 1.45; }
.im-biz-content { font-size: 12.5px; color: #64748b; margin-top: 5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.im-biz-go { margin-top: 9px; border: none; background: #eef4ff; color: #2B65D9; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.im-biz-go:hover { background: #2B65D9; color: #fff; }
.im-msg-mine .im-biz-card { background: #f8faff; }
.im-sys-go { border: none; cursor: pointer; font-family: inherit; }

/* 待办 Tab 工具栏与卡片 */
.im-todo-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eef2f6; background: #fafbfd; flex-wrap: wrap; }
.im-todo-q { max-width: 280px; }
.im-todo-urgent { font-size: 13px; color: #334155; display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.im-todo-count { font-size: 12px; color: #94a3b8; margin-left: auto; }
.im-todo-card.im-todo-urgent-card { border-left: 3px solid #dc2626; }
.im-todo-icon { font-size: 15px; margin-right: 2px; }
.im-todo-flag { font-size: 10.5px; color: #dc2626; background: #fee2e2; border-radius: 999px; padding: 2px 7px; margin-right: 6px; white-space: nowrap; }
.im-todo-proj { font-size: 12px; color: #0f766e; background: #e6f4f1; border-radius: 999px; padding: 3px 9px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 通知三级优先级标签 */
.im-notif-pri { display: inline-block; font-size: 10.5px; border-radius: 999px; padding: 2px 7px; margin-left: 8px; vertical-align: 1px; font-weight: 400; }
.np-high { background: #fee2e2; color: #dc2626; }
.np-mid { background: #dbeafe; color: #2B65D9; }
.np-low { background: #f1f5f9; color: #64748b; }

@media (max-width: 720px) {
  .im-todo-toolbar { padding: 10px; gap: 8px; }
  .im-todo-q { max-width: 100%; }
  .im-biz-card { max-width: 240px; min-width: 180px; }
}

/* ===== P125 装企端消息：业务域分组（设计大厅/工单大厅/启新优选/审批/常用/归档） ===== */
/* 搜索行 + 新建 */
/* P158e：顶部完全按企微——白底一行，灰胶囊搜索框（内嵌放大镜）+ 灰圆角方块＋号，无下边框 */
.im-conv-search-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; background: #fff; }
.im-conv-search-row .im-conv-search { flex: 1; min-width: 0; }
.im-conv-search {
  padding: 7px 10px 7px 28px; border: none; background: #f2f3f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cline x1='20.5' y1='20.5' x2='16' y2='16'/%3E%3C/svg%3E") no-repeat 9px center / 13px 13px;
  border-radius: 8px; font-size: 13px; outline: none; color: #1f2937;
}
.im-conv-search::placeholder { color: #9ca3af; }
.im-conv-search:focus { background-color: #eceded; }
.im-conv-new {
  width: 30px; height: 30px; padding: 0; flex-shrink: 0;
  border: none; background: #f2f3f5; border-radius: 8px; color: #4b5563;
  font-size: 18px; font-weight: 400; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.im-conv-new:hover { background: #e5e7eb; color: #1f2937; }
/* 域筛选 chips */
.im-conv-chips { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; border-bottom: 1px solid #eef2f6; background: #fafbfc; flex-shrink: 0; scrollbar-width: none; }
.im-conv-chips::-webkit-scrollbar { display: none; }
.im-chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; border: 1px solid #e3e8ef; background: #fff; color: #475569; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: all .15s; font-family: inherit; }
.im-chip:hover { border-color: #2B65D9; color: #2B65D9; }
.im-chip.active { background: #2B65D9; border-color: #2B65D9; color: #fff; font-weight: 600; }
.im-chip-n { background: rgba(15, 23, 42, .08); color: inherit; font-size: 10.5px; border-radius: 999px; padding: 0 6px; line-height: 15px; }
.im-chip.active .im-chip-n { background: rgba(255, 255, 255, .25); }
/* 分组头 */
.im-grp-head { display: flex; align-items: center; gap: 6px; padding: 8px 12px 4px; cursor: pointer; user-select: none; font-size: 12px; color: #64748B; font-weight: 600; }
.im-grp-head:hover { color: #2B65D9; }
.im-grp-chev { font-size: 10px; color: #94a3b8; width: 10px; text-align: center; }
.im-grp-icon { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.im-grp-label { flex-shrink: 0; }
.im-grp-n { color: #94a3b8; font-weight: 400; font-size: 11px; margin-left: auto; }
.im-grp-badge { background: #ef4444; color: #fff; border-radius: 9px; font-size: 10px; padding: 1px 6px; min-width: 16px; text-align: center; line-height: 1.5; }
/* 会话条目 P125 微调（P156 企微化：恢复垂直居中） */
.im-conv-item { align-items: center; }
.im-conv-av-wrap { position: relative; flex-shrink: 0; }
.im-conv-star { position: absolute; right: -4px; bottom: -4px; background: #FFFBEB; border: 1px solid #fcd34d; color: #f59e0b; font-size: 9px; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.im-conv-item.im-conv-archived { opacity: .72; }
.im-conv-item.im-conv-archived:hover { opacity: 1; }
.im-conv-ops { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.im-conv-more { width: 24px; height: 22px; border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 16px; line-height: 1; border-radius: 5px; visibility: hidden; }
.im-conv-item:hover .im-conv-more, .im-conv-item.active .im-conv-more { visibility: visible; }
.im-conv-more:hover { background: rgba(51, 112, 255, .12); color: #3370ff; }
.im-conv-tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 1px; }
.im-dom-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; line-height: 1; padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.im-conv-tags .im-dom-tag { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
/* P158 平台消息（企微「应用提醒」式下钻） */
.im-app-back { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #334155; border-bottom: 1px solid #f1f5f9; background: #f8fafc; transition: background .15s; }
.im-app-back:hover { background: #eef2ff; color: #2B65D9; }
.im-app-back-arrow { font-size: 16px; line-height: 1; }
.im-app-pane { flex: 1; overflow-y: auto; padding: 20px 24px; }
.im-app-pane-title { font-size: 18px; font-weight: 700; color: #0f172a; }
.im-app-pane-sub { font-size: 13px; color: #64748b; margin-top: 4px; }
.im-app-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; max-width: 760px; }
.im-app-sec-title { font-size: 13.5px; font-weight: 700; color: #334155; margin: 4px 0 0; }
.im-app-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.im-app-card:hover { border-color: #2B65D9; box-shadow: 0 4px 14px rgba(43, 101, 217, .10); }
.im-app-card-head { display: flex; align-items: center; gap: 12px; }
.im-app-card-main { flex: 1; min-width: 0; }
.im-app-card-title { font-size: 14px; font-weight: 600; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-app-card-sub { font-size: 12px; color: #64748b; margin-top: 3px; }
.im-app-card-latest { margin-top: 10px; font-size: 13px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* P158e：引导页横排品牌锁定——图标在左 + 名称/标语在右（企微式） */
.im-welcome-logo { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.im-welcome-lockup { display: flex; align-items: center; gap: 20px; }
.im-welcome-text { text-align: center; }          /* P158j：品牌名居中于标语上方 */
.im-welcome-name { font-size: 30px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.im-welcome-slogan { font-size: 13.5px; color: #94a3b8; margin-top: 7px; letter-spacing: .5px; }
.im-qa-pane { display: flex; flex-direction: column; overflow: hidden; max-width: 860px; }
.im-qa-box { flex: 1; min-height: 0; overflow-y: auto; margin-top: 12px; padding: 14px 16px; background: #fafbfc; border: 1px solid #e2e8f0; border-radius: 12px; }
.im-qa-input-row { display: flex; gap: 10px; margin-top: 12px; }
.im-qa-input-row input { flex: 1; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font-size: 13px; outline: none; font-family: inherit; }
.im-qa-input-row input:focus { border-color: #2B65D9; }
/* 聊天窗口头部 */
.im-m-back { display: none; }
.im-pane-biz { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 16px; border-bottom: 1px solid #f3f4f6; background: #fff; }
/* 上下文抽屉（会话 ⋯ 更多） */
.btn-block { width: 100%; }
.im-ctx-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #f1f4f8; margin-bottom: 10px; }
.im-ctx-name { font-size: 16px; font-weight: 700; color: #1e293b; word-break: break-all; }
.im-ctx-sub { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.im-ctx-rows { margin-bottom: 10px; }
.im-ctx-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.im-ctx-btn { border: 1px solid #dbe4f0; background: #fff; color: #334155; font-size: 13px; padding: 9px 10px; border-radius: 8px; cursor: pointer; transition: all .15s; font-family: inherit; text-align: center; }
.im-ctx-btn:hover { border-color: #2B65D9; color: #2B65D9; background: #f0f5ff; }
.im-ctx-btn.im-ctx-danger { color: #dc2626; border-color: #fecaca; }
.im-ctx-btn.im-ctx-danger:hover { background: #fef2f2; border-color: #dc2626; }
.im-ctx-btn:disabled { opacity: .55; cursor: default; border-color: #e5e7eb; color: #9ca3af; }
.im-ctx-members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.im-ctx-btn:hover:disabled { background: #fff; border-color: #e5e7eb; color: #9ca3af; }
/* 待办域 chips 行 */
.im-todo-domchips { display: flex; gap: 6px; padding: 8px 14px; overflow-x: auto; border-bottom: 1px solid #eef2f6; background: #fff; scrollbar-width: none; flex-wrap: wrap; }
.im-todo-domchips::-webkit-scrollbar { display: none; }
.im-todo-card .im-todo-dom { margin-right: 2px; vertical-align: 1px; }
/* P125 窄屏：列表态 / 聊天态互斥（微信式两态） */
@media (max-width: 800px) {
  .im-layout.im-m-list { display: flex; flex-direction: column; height: 100vh; }
  .im-layout.im-m-list .im-conv-list { width: 100%; max-height: none; flex: 1; border-right: none; border-bottom: none; }
  .im-layout.im-m-list .im-conv-pane { display: none; }
  .im-layout.im-m-chat { display: flex; flex-direction: column; height: 100vh; }
  .im-layout.im-m-chat .im-conv-list { display: none; }
  .im-layout.im-m-chat .im-conv-pane { display: flex; min-height: 0; flex: 1; }
  .im-m-back { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #dbe4f0; background: #fff; color: #2B65D9; border-radius: 7px; cursor: pointer; font-size: 15px; flex-shrink: 0; }
  .im-conv-more { visibility: visible; }
  .im-pane-actions .btn { padding: 4px 8px; font-size: 12px; }
  .im-pane-actions .btn.btn-outline { display: none; }
  .im-pane-actions .im-ctx-btn.btn-outline, .im-pane-actions .btn-outline:first-child { display: inline-flex; }
  .im-ctx-acts { grid-template-columns: 1fr 1fr; }
}
/* 更小屏（≤420px）抽屉操作单列、chips 紧凑 */
@media (max-width: 420px) {
  .im-ctx-acts { grid-template-columns: 1fr; }
  .im-conv-chips { padding: 7px 8px; }
  .im-chip { padding: 3px 8px; font-size: 11.5px; }
  .im-todo-domchips { padding: 7px 10px; }
}

/* ===== P98 客户外链弹窗 ===== */
.p98-sec-title { font-size: 13px; font-weight: 700; color: var(--primary, #2563eb); margin: 4px 0 8px; display: flex; align-items: center; gap: 6px; }
.p98-sec-title::after { content: ''; flex: 1; height: 1px; background: var(--border, #e2e8f0); }

/* ===== P120 设计大厅页面优化（平台端） ===== */
.dh-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0 14px; }
.dh-stat { background: #fff; border: 1px solid #e8ecf2; border-radius: 8px; padding: 14px 16px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.dh-stat:hover { box-shadow: 0 2px 10px rgba(31, 93, 232, .12); }
.dh-stat.on { border-color: #1F5DE8; background: #f0f5ff; }
.dh-stat-num { font-size: 24px; font-weight: 800; line-height: 1.25; }
.dh-stat-label { font-size: 12px; color: #64748b; margin-top: 2px; }
/* P170h T2：统计卡下方趋势行 */
.dh-stat-sub { font-size: 11px; line-height: 1.4; }
.dh-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.dh-toolbar .form-control { font-size: 13px; }
.dh-toolbar .dh-search { width: 240px; }
/* P170h T4：工具栏单行化第二行（批量操作） */
.dh-toolbar-2 { border-top: 1px dashed #e8ecf2; padding-top: 10px; margin-top: 4px; }
.dh-toolbar-2 .btn-sm { padding: 5px 12px; font-size: 12px; }
.dh-toolbar-2 .btn-sm.disabled { opacity: .5; cursor: not-allowed; }
.dh-check-lbl { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.dh-sel-count { font-size: 12px; color: #7c3aed; background: #f3e8ff; padding: 3px 10px; border-radius: 6px; font-weight: 600; }
.dh-shortcut-hint { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.dh-adv-btn.on { background: #1F5DE8 !important; color: #fff !important; border-color: #1F5DE8 !important; }
/* P170h T4：视图切换（胶囊按钮组） */
.dh-view-switch { display: flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.dh-view-switch button { background: #fff; color: #64748b; border: none; padding: 5px 10px; cursor: pointer; font-size: 14px; transition: all .15s; }
.dh-view-switch button.on { background: #1F5DE8; color: #fff; }
.dh-view-switch button + button { border-left: 1px solid #cbd5e1; }
/* P170h T4：图标按钮（紧凑） */
.dh-icon-btn { padding: 4px 8px !important; font-size: 13px !important; min-width: 30px; }
.dh-adv { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; background: #f8fafc; border: 1px solid #e8ecf2; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.dh-pagebar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dh-empty { text-align: center; padding: 52px 0; }
.dh-check { width: 16px; height: 16px; cursor: pointer; accent-color: #1F5DE8; flex-shrink: 0; }

/* P170h T3：快捷筛选 chips */
.dh-chip-strip { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; flex-wrap: wrap; }
.dh-chip { background: #fff; border: 1px solid #e2e8f0; color: #475569; padding: 5px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; transition: all .15s; line-height: 1.4; }
.dh-chip:hover { background: #f8fafc; border-color: var(--chip-color, #cbd5e1); color: var(--chip-color, #334155); }
.dh-chip.on { background: var(--chip-color, #1F5DE8); color: #fff; border-color: var(--chip-color, #1F5DE8); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }

/* P170h T1：紧急工单视觉分层 */
.dh-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; transition: box-shadow .15s, transform .12s; cursor: pointer; }
.dh-card:hover { box-shadow: 0 2px 10px rgba(31, 93, 232, .08); }
.dh-card-warn { border-left: 3px solid #f59e0b; background: linear-gradient(to right, #fffbeb 0%, #fff 12px); }
.dh-card-urgent { border-left: 4px solid #dc2626; background: linear-gradient(to right, #fef2f2 0%, #fff 12px); box-shadow: 0 0 0 1px rgba(220, 38, 38, .15); }
.dh-card-severe { border-left: 4px solid #7c2d12; background: linear-gradient(to right, #fef2f2 0%, #fff 14px); box-shadow: 0 0 0 2px rgba(220, 38, 38, .25); animation: dhCardSeverePulse 2s ease-in-out infinite; }
@keyframes dhCardSeverePulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(220, 38, 38, .25); } 50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, .4); } }

/* P170h T5：卡片信息分层（默认折叠次要 meta + 缩略图） */
.dh-card-meta-expand, .dh-thumbs { display: none; }
.dh-card-expanded .dh-card-meta-expand, .dh-card-expanded .dh-thumbs { display: flex; }
.dh-card-expanded .dh-card-meta-expand { display: flex; gap: 12px; flex-wrap: wrap; }
.dh-card-expanded .dh-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-expand-btn { background: none; border: 1px solid #e2e8f0; color: #64748b; padding: 2px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; flex-shrink: 0; }
.dh-expand-btn:hover { background: #f8fafc; }

/* P170h 卡片布局调整 */
.dh-card-hd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dh-card-hd2 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: #475569; }
.dh-card-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: #64748b; }
.dh-card-ft { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.dh-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dh-status-overdue { background: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #dc2626 !important; }
.dh-status-severe { background: #7c2d12 !important; color: #fff !important; border: 1px solid #7c2d12 !important; animation: dhSeverePulse 1.8s ease-in-out infinite; }
@keyframes dhSeverePulse { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
.dh-status-warn { background: #fffbeb !important; color: #d97706 !important; border: 1px solid #f59e0b !important; }
.dh-countdown { background: #eff6ff !important; color: #1F5DE8 !important; border: 1px solid #93c5fd !important; }

/* P170h F5：设计师工作量徽章 */
.dh-work-badge { background: #f3e8ff; color: #7c3aed; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-left: 4px; }

/* P170h F7：驳回原因模板 chips */
.dh-reject-tpl { padding: 4px 10px; font-size: 12px; }
.dh-reject-tpl.on { background: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; }

/* P170h F8：导出范围单选 */
.dh-export-opt { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; transition: background .15s; font-size: 13px; }
.dh-export-opt:hover { background: #f8fafc; }
.dh-export-opt input[type=radio] { accent-color: #1F5DE8; margin-top: 3px; }
/* P170h F9：快捷键浮窗（默认隐藏） */
.dh-kbd-hint { display: none; }
.dh-kbd-hint.show { display: block; }
/* P120：移动端侧栏抽屉（≤768px 侧栏屏幕外收纳） */
.mobile-menu-btn { display: none; position: fixed; top: 12px; left: 12px; z-index: 1050; width: 38px; height: 38px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 17px; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 23, 42, .08); }
.mobile-menu-mask { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, .35); z-index: 1090; }
.mobile-menu-mask.show { display: block; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 1100; }
  .sidebar.mobile-open { transform: none; box-shadow: 8px 0 24px rgba(15, 23, 42, .18); }
  .mobile-menu-btn { display: flex; }
  .dh-stats { grid-template-columns: 1fr 1fr; }
  .dh-adv { grid-template-columns: 1fr 1fr; }
  .dh-list { grid-template-columns: 1fr; }
  .dh-toolbar { gap: 6px; }
  .dh-toolbar > .btn-sm { padding: 5px 10px; font-size: 12px; }
  .dh-pagebar { justify-content: center; }
  /* P170h：移动端 chips 紧凑 + 工具栏第二行允许换行 */
  .dh-chip-strip { gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .dh-chip { padding: 3px 10px; font-size: 12px; }
  .dh-toolbar .dh-search { width: 160px; }
  .dh-view-switch button { padding: 4px 8px; font-size: 12px; }
  .dh-card-hd2 { font-size: 12px; gap: 8px; }
  .dh-status { font-size: 11px; padding: 1px 6px; }
  /* P170h：弹窗移动端底部滑出 */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal-content { width: 100%; max-width: 100% !important; border-radius: 16px 16px 0 0; max-height: 86vh; overflow-y: auto; animation: dhSheetUp .2s ease; }
  @keyframes dhSheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* ==================== P123 提交深化设计需求弹窗 v3（分组垂直表单 / 附件 / 模板 / 草稿） ==================== */
/* P127-④b：弹窗收窄到 900px（对齐商户端表单系宽度，避免渲染偏宽） */
.p123-modal { max-width: 900px !important; }
.p123-modal .modal-body { padding: 16px 18px 18px; }
.p123-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; padding: 10px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; }
.p123-tool { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.p123-tool-t { font-size: 12px; color: #475569; font-weight: 600; }
.p123-tool-del { flex-shrink: 0; margin-bottom: 1px; }
.p123-modal .form-control { width: 100%; box-sizing: border-box; }
.p123-modal input.form-control, .p123-modal select.form-control, .p123-modal textarea.form-control { padding: 8px 10px; font-size: 13px; border: 1px solid #d8dee9; border-radius: 6px; background: #fff; color: #1e293b; outline: none; transition: border-color .15s, box-shadow .15s; }
.p123-modal input.form-control:focus, .p123-modal select.form-control:focus, .p123-modal textarea.form-control:focus { border-color: #1F5DE8; box-shadow: 0 0 0 3px rgba(31, 93, 232, .12); }
.p123-modal input.form-control.is-err, .p123-modal textarea.form-control.is-err { border-color: #dc2626; }
.p123-fgroup { margin-bottom: 20px; }
.p123-fgroup:last-of-type { margin-bottom: 4px; }
.p123-fgroup-title { font-size: 13px; font-weight: 700; color: #475569; background: #f1f5f9; padding: 7px 12px; border-radius: 6px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.p123-fgroup-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: #1F5DE8; display: inline-block; }
.p123-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.p123-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.p123-label { font-size: 13px; color: #334155; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.p123-req { color: #dc2626; font-style: normal; font-size: 15px; line-height: 1; }
.p123-opt { font-size: 12px; color: #94a3b8; font-weight: 400; }
.p123-hint { font-size: 11px; color: #94a3b8; line-height: 1.5; }
.p123-err { display: none; font-size: 11px; color: #dc2626; line-height: 1.5; }
.p123-banner { font-size: 13px; color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.8; }
.p123-upload { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; border: 1.5px dashed #cbd5e1; border-radius: 8px; background: #fafbfc; }
.p123-upload-note { font-size: 11px; color: #94a3b8; width: 100%; line-height: 1.6; }
#p123-atts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.p123-att-empty { font-size: 12px; color: #b6c0cf; text-align: center; padding: 10px; border: 1px dashed #e8ecf2; border-radius: 6px; }
.p123-atom { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e8ecf2; border-radius: 8px; padding: 6px 10px; }
.p123-atom-thumb { width: 42px; height: 42px; border-radius: 6px; overflow: hidden; border: 1px solid #eef2f7; background: #f8fafc; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p123-atom-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.p123-atom-meta { flex: 1; min-width: 0; }
.p123-atom-name { font-size: 12px; color: #0f172a; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p123-atom-info { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.p123-atom-open { font-size: 15px; color: #2563eb; text-decoration: none; flex-shrink: 0; }
.p123-atom-del { border: none; background: #fef2f2; color: #dc2626; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; flex-shrink: 0; }
.p123-ft { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef2f7; }
/* 商户需求列表 */
.p123-note { font-size: 12px; color: #475569; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 6px; padding: 6px 10px; margin-top: 6px; line-height: 1.7; }
.p123-note-rej { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.p123-note-meta { color: #94a3b8; margin-left: 8px; }
.p123-filechip { font-size: 11px; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 4px 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 平台来源统计条 */
.p123-srcstrip { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 0; font-size: 12px; }
.p123-srcchip { padding: 3px 10px; border-radius: 12px; border: 1px solid #dfe3ea; background: #fff; color: #475569; cursor: pointer; user-select: none; }
.p123-srcchip b { font-weight: 700; }
.p123-srcchip.on { background: #1F5DE8; border-color: #1F5DE8; color: #fff; }
/* 需求详情弹窗 */
.p123-brow { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #f1f5f9; font-size: 13px; }
.p123-brow span { width: 92px; flex-shrink: 0; color: #94a3b8; }
.p123-brow b { color: #1e293b; font-weight: 600; word-break: break-all; }
.p123-detail-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; margin-top: 10px; }
.p123-detail-sec { margin-top: 12px; }
.p123-detail-sec-t { font-size: 12px; color: #64748b; font-weight: 700; margin-bottom: 4px; }
@media (max-width: 768px) {
  .p123-grid { grid-template-columns: 1fr; gap: 12px; }
  .p123-detail-grid { grid-template-columns: 1fr; }
  .p123-tool { min-width: 0; }
  .p123-ft { flex-wrap: wrap; }
  .p123-ft .btn { flex: 1; justify-content: center; }
  .p123-modal .modal-body { padding-bottom: 20px; }
  .p123-srcchip { padding: 5px 10px; }
}

/* P179：材料单未读新动态红点脉冲 */
@keyframes mrPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
