/* NEME 同事（英文界面）的只读样式：隐藏所有会改动客户资料的入口 */
body.neme-readonly #detailView .detail-actions,
body.neme-readonly #detailView #refreshRecognitionBtn,
body.neme-readonly #detailView .apostille-upload,
body.neme-readonly #detailView .intake-edit-note,
body.neme-readonly #detailView .doc-slot > span {
  display: none !important;
}

body.neme-readonly #detailView .doc-slot {
  cursor: default;
}

body.neme-readonly #detailView .doc-slot input[type="file"] {
  display: none;
}

/* 只读字段保持清晰可读，而不是灰掉 */
body.neme-readonly #detailView input:disabled,
body.neme-readonly #detailView select:disabled,
body.neme-readonly #detailView textarea:disabled {
  background: #f5f8fb;
  border-color: #e2e9f1;
  color: #16283c;
  -webkit-text-fill-color: #16283c;
  opacity: 1;
  cursor: default;
}

/* 只读字段：去掉输入框外观，看起来就是文本（值仍可选中复制） */
body.neme-readonly #detailView input.neme-readonly-field,
body.neme-readonly #detailView textarea.neme-readonly-field {
  border: 0;
  background: transparent;
  padding-left: 0;
  color: #16283c;
  -webkit-text-fill-color: #16283c;
  font-weight: 600;
  cursor: default;
  box-shadow: none;
}
body.neme-readonly #detailView input.neme-readonly-field:hover,
body.neme-readonly #detailView input.neme-readonly-field:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}
body.neme-readonly #detailView select:disabled {
  appearance: none;
}

/* NEME 同事看不到「客户填写端」入口 */
body.neme-mode .intake-link {
  display: none !important;
}

/* 客户列表：只保留「查看」，去掉编辑 / 删除 */
body.neme-readonly #clientsTable [data-edit-client],
body.neme-readonly #clientsTable [data-delete-client] {
  display: none !important;
}

/* 客户列表：NEME 的编号与安博不同，「状态」列与只读编号一起隐藏，客户行改成点「Edit」进档案页编辑编号 */
body.neme-mode #clientsView .neme-col-status {
  display: none !important;
}

/* 客户档案：业务状态属于安博内部流程，NEME 界面不显示标题旁的状态徽标 */
body.neme-mode #detailView #detailStatus {
  display: none !important;
}

/* 「通知 NEME 处理」（交接提醒页）是安博同事的操作入口，NEME 界面不显示 */
body.neme-mode #handoffNotifyPanel {
  display: none !important;
}


/* 客户档案：NEME 只能编辑「客户编号」，输入框 + Save code 并排 */
#profileForm .neme-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#profileForm .neme-code-row input {
  flex: 1 1 auto;
  min-width: 110px;
  background: #fff;
  border-color: #cdd8e6;
}

#profileForm .neme-code-row input:focus {
  outline: none;
  border-color: #c99a45;
  box-shadow: 0 0 0 3px rgba(201, 154, 69, 0.18);
}

#profileForm #nemeClientCodeSaveBtn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 「下载客户资料」里不提供「下载Excel」（Annex I）：NEME 界面只保留 POA / 海牙认证 */
body.neme-mode .nav-item[data-download-tab="excel"],
body.neme-mode .download-subtab[data-download-tab="excel"],
body.neme-mode #downloadExcelPane {
  display: none !important;
}

/* 「中文姓名（证件原文）」是安博内部字段：NEME 英文界面一律不显示汉字姓名 */
body.neme-mode #intakeSubmission [data-field="nome_cn"],
body.neme-mode #intakeSubmission [data-key="nome_cn"] {
  display: none !important;
}

/* 「等待 NEME 制作 POA 的客户」是安博侧视图（含手动再提醒按钮），NEME 不看 */
body.neme-mode #handoffNemePanel {
  display: none !important;
}

/* 卖家信息表：NEME 可以查看与编辑单元格 / 追加行，但「重新同步本地数据」会用备份 CSV
   覆盖两边所有改动，只留给安博同事（后端也会拒绝 NEME 调用该接口）。 */
body.neme-mode #sheetCloneReseedBtn {
  display: none !important;
}

/* 总览：NEME 只看自己的看板，安博那套统计（任务队列 / 邮件 / 核对状态）整块隐藏 */
body.neme-mode #dashboardView .stats-grid,
body.neme-mode #dashboardView .dash-grid {
  display: none !important;
}

/* NEME 总览布局（只有 NEME 会看到，文字本身就是英文，不依赖词典） */
#nemeDashboard{margin-top:20px}
#nemeDashboard .neme-dash-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
#nemeDashboard .stat-card{gap:6px}
#nemeDashboard .stat-card strong{font-size:30px}
#nemeDashboard .stat-card.is-warn{border-left:3px solid #d9a441}
#nemeDashboard .stat-card.is-done{border-left:3px solid #198f72}
#nemeDashboard .neme-dash-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}
#nemeDashboard .neme-dash-wide{grid-column:1 / -1}
#nemeDashboard .neme-dash-note{display:block;margin-top:12px;line-height:1.55}
#nemeDashboard .neme-dash-list{display:grid;gap:9px}
#nemeDashboard .neme-dash-list.empty{display:block}
#nemeDashboard .neme-dash-card{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:11px 13px;border:1px solid #e6ecf2;border-radius:11px;background:#fbfcfe}
#nemeDashboard .neme-dash-card-main{display:grid;gap:3px;min-width:0}
#nemeDashboard .neme-dash-card-main b{font-size:13px;color:#16283c}
#nemeDashboard .neme-dash-card-main span{font-size:11.5px;color:#6b7b8f}
/* NEME 总览待办卡片里的通知内容（POA 提醒 = POA 邮件正文），最多显示 6 行，完整内容在交接提醒里看 */
#nemeDashboard .neme-dash-card-detail{margin:3px 0 0;padding:8px 10px;border-radius:9px;background:#f7fafc;border:1px solid #e8eef4;color:#41546b;font-size:11.5px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}
#nemeDashboard .neme-dash-card-actions{display:flex;gap:7px;flex-wrap:wrap}
#nemeDashboard .neme-dash-row{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:11px 13px;border:1px solid #e6ecf2;border-radius:11px;background:#fbfcfe}
#nemeDashboard .neme-dash-row{cursor:pointer}
#nemeDashboard .neme-dash-row:hover{border-color:#c99a45;background:#fffdf6}
#nemeDashboard .neme-dash-row-main{display:grid;gap:3px;min-width:0}
#nemeDashboard .neme-dash-row-main b{font-size:13px;color:#16283c}
#nemeDashboard .neme-dash-row-main span{font-size:11.5px;color:#6b7b8f}
@media(max-width:1100px){#nemeDashboard .neme-dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){#nemeDashboard .neme-dash-grid{grid-template-columns:1fr}}
