/* ============================================================================
   Amber NEME 业务系统 · 版式精修层（Atelier Refinement）
   ---------------------------------------------------------------------------
   本文件在 index.html 里**最后加载**，只做视觉与排版统一，不动任何结构、
   类名或交互逻辑。要解决的问题（都是实测出来的不一致）：

     · 各模块页面主标题 23px / 30px / 32px 三套字号混用
     · 面板小标题 17px / 18px / 19px / 21px 混用
     · 卡片圆角 18px 与 14px 混用、内边距 26px 28px 与 22px 24px 混用
     · 按钮高度 34～46px、圆角 8/9/11/13px 混用，主按钮深浅不一
     · 表格表头在「深蓝底浅字」与「浅灰底灰字」之间来回切换
     · 数字列没有等宽数字，纵向对不齐

   目标：一套字号阶梯、一套圆角、一套按钮、一套表格，配色更克制更高端。

   目录：1) 设计令牌 2) 基础排版 3) 侧栏 4) 顶栏/页面抬头 5) 模块 hero
        6) 卡片与面板 7) 数据表格 8) 按钮 9) 表单 10) 徽标 11) 弹窗/提示
        12) 客户档案 13) 响应式与动效
   ============================================================================ */

/* ---------- 1) 设计令牌 ---------- */
:root{
  /* 文字与线条：中性色偏冷，保证长文阅读舒适、正文对比度 ≥ 4.5:1 */
  --ink:#0f1e31;
  --ink-2:#23334a;
  --muted:#55647a;
  /* faint 用在小号说明文字上，必须满足 AA 4.5:1（#63728a 在白底约 4.9:1） */
  --faint:#63728a;
  --line:#e5eaf1;
  --line-soft:#eef2f7;
  --line-strong:#d6dfe9;
  --bg:#f1f4f8;
  --card:#ffffff;
  --surface-2:#fafbfd;

  /* 品牌色：更深的海军蓝 + 更克制的香槟金（降低饱和度，去掉“土豪金”感） */
  --navy:#0a1c31;
  --navy-2:#12395f;
  --navy-deep:#061423;
  --navy2:#12395f;
  --navy3:#1b4f7d;
  --gold:#b78f2e;
  --gold-2:#d9b76b;
  --gold-soft:#faf5e9;
  --gold-line:#eadfc2;
  --gold-ink:#7d5c14;
  --amber:#b78f2e;

  /* 语义色：统一的“实色 + 浅底”成对使用 */
  --green:#0f7a5a;
  --green-soft:#e9f5f0;
  --red:#b23a4a;
  --red-soft:#fbecee;
  /* 金色/琥珀小字要在浅琥珀底上达标，因此 warn 比纯装饰金更深 */
  --warn:#8f6410;
  --warn-soft:#fdf4e2;
  --info:#1c5c9b;
  --info-soft:#eaf1f9;

  /* 兼容旧变量名 */
  --soft:#f4f7fa;
  --white:#fff;
  --shadow:0 10px 30px rgba(15,30,49,.07);

  /* 圆角：只用四档 */
  --radius-sm:9px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:20px;

  /* 阴影：柔和三层，替代原来的单层重投影 */
  --shadow-sm:0 1px 2px rgba(15,30,49,.04),0 1px 3px rgba(15,30,49,.03);
  --shadow-md:0 2px 6px rgba(15,30,49,.05),0 12px 28px -10px rgba(15,30,49,.14);
  --shadow-lg:0 26px 64px rgba(8,22,40,.24);
  --shadow-card:0 1px 2px rgba(15,30,49,.035),0 10px 24px -14px rgba(15,30,49,.16);

  --focus-ring:0 0 0 3px rgba(183,143,46,.26);

  /* 客户档案里「上传 / 更换」小牌子的底色（两端共用） */
  --pill-strong:#c99a45;
  --pill-idle:#173d61;

  /* 字号阶梯：各模块页面统一引用这几个变量 */
  --fs-page:22px;     /* 顶栏页面标题 */
  --fs-hero:26px;     /* 模块 hero 大标题 */
  --fs-section:16px;  /* 面板 / 卡片标题 */
  --fs-body:13.5px;
  --fs-small:12.5px;
  --fs-label:11px;
}

/* ---------- 2) 基础排版 ---------- */
body{background:var(--bg);color:var(--ink);font-size:var(--fs-body)}
.eyebrow{letter-spacing:2.2px;font-weight:800}
.eyebrow.dark{color:var(--gold-ink)}
.muted{color:var(--muted)}
::selection{background:rgba(183,143,46,.22)}
:focus-visible{outline:2px solid rgba(183,143,46,.65);outline-offset:2px;border-radius:6px}

/* 数据类文字统一等宽数字，纵向一眼对齐 */
table td,table th,
.stat-card strong,
.dossier-stat b,
.date-pill,
.nav-badge,
.badge{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}

/* ---------- 3) 侧栏 ---------- */
.sidebar{
  background:
    radial-gradient(520px 220px at 8% -8%,rgba(217,183,107,.10),transparent 62%),
    linear-gradient(180deg,#0b2138 0%,#08192c 56%,#061423 100%);
  border-right:1px solid rgba(255,255,255,.055);
}
.sidebar .brand{font-size:16.5px;font-weight:750;letter-spacing:.2px}
.brand-mark{
  border-radius:12px;
  background:linear-gradient(150deg,#e8c884,#b78f2e 72%);
  color:#0d2138;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42),0 6px 16px rgba(0,0,0,.28);
}
.nav-section-label{color:#65809d;letter-spacing:1.8px;font-weight:800}
.nav-item{
  color:#9db0c4;font-weight:600;border-radius:10px;
  transition:background .16s ease,color .16s ease,box-shadow .16s ease;
}
.nav-item>span{color:#7b93ae}
.nav-item:hover{background:rgba(255,255,255,.055);color:#eaf1f8}
.nav-item:hover>span{color:#a8c0d6}
.nav-item.active{
  color:#fff;
  background:linear-gradient(90deg,rgba(217,183,107,.20),rgba(217,183,107,.05) 62%,rgba(255,255,255,0));
  box-shadow:inset 3px 0 var(--gold-2);
}
.nav-item.active>span{color:var(--gold-2)}
.nav-badge{background:linear-gradient(135deg,#d2455c,#b3283f);font-weight:800}
.sidebar-foot{border-top:1px solid rgba(255,255,255,.07)}
.sidebar-user{color:#7f97b0}

/* ---------- 4) 顶栏 / 页面抬头 ---------- */
.topbar{height:88px;background:rgba(241,244,248,.86);border-bottom:1px solid rgba(214,223,233,.85)}
.topbar p{font-size:10.5px;letter-spacing:2.4px;color:#8593a6;font-weight:800}
.topbar h1{font-size:var(--fs-page);font-weight:750;letter-spacing:-.35px;color:var(--ink)}
.date-pill{
  font-size:12px;font-weight:600;color:var(--muted);
  padding:9px 14px;border:1px solid var(--line);border-radius:11px;background:#fff;
}

/* ---------- 5) 模块 hero：统一字号、统一圆角、统一金色细线 ---------- */
#appView .module-hero,
#appView #cpfModuleView .module-hero,
#appView #nemePoaModuleView .module-hero,
#appView #clientsView .clients-hero,
#appView .clients-hero{
  min-height:0;
  padding:28px 32px;
  border-radius:var(--radius-lg);
  border:1px solid rgba(217,183,107,.24);
  background:
    radial-gradient(720px 240px at 92% -34%,rgba(217,183,107,.17),transparent 58%),
    radial-gradient(560px 240px at -8% 128%,rgba(86,146,199,.18),transparent 58%),
    linear-gradient(126deg,#0a1f36 0%,#123a60 58%,#0c2946 100%);
  box-shadow:0 18px 44px -18px rgba(8,22,40,.42),inset 0 1px 0 rgba(255,255,255,.07);
  overflow:hidden;
}
#appView .module-hero::after,
#appView #cpfModuleView .module-hero::after,
#appView #nemePoaModuleView .module-hero::after,
#appView .clients-hero::after{
  content:"";position:absolute;inset:0 0 auto;height:2px;
  background:linear-gradient(90deg,rgba(217,183,107,0),var(--gold-2) 16%,#f0dca8 50%,rgba(217,183,107,0));
  pointer-events:none;
}
#appView .module-hero h2,
#appView #cpfModuleView .module-hero h2,
#appView #nemePoaModuleView .module-hero h2,
#appView .clients-hero h2,
#appView #clientsView .clients-hero h2{
  font-family:Inter,"SF Pro Display","PingFang SC",system-ui,sans-serif;
  font-size:var(--fs-hero);
  font-weight:750;
  letter-spacing:-.3px;
  line-height:1.2;
  margin:8px 0 0;
  color:#fff;
}
#appView .module-hero p,
#appView #cpfModuleView .module-hero p,
#appView #nemePoaModuleView .module-hero p{
  max-width:680px;margin:10px 0 0;color:#b6c8d9;font-size:var(--fs-small);line-height:1.7;
}
#appView .module-hero .eyebrow,
#appView #cpfModuleView .module-hero .eyebrow{color:#e0c179;letter-spacing:2.4px}
.module-number{
  border:1px solid rgba(217,183,107,.45);border-radius:7px;
  color:var(--gold-2);font-weight:900;
}

/* ---------- 6) 卡片与面板：一套圆角 + 一套内边距 + 一套阴影 ---------- */
#appView .panel,
#appView .card,
#appView .module-card,
#appView .dash-panel,
#appView .export-module-card,
#appView .notarial-card,
#appView .selected-client-summary,
#appView .module-upload,
#appView .settings-table-wrap{
  border-radius:var(--radius-lg);
}
#appView .panel{
  padding:24px 26px;
  border:1px solid var(--line);
  box-shadow:var(--shadow-card);
}
/* 设置页的折叠面板原来用 14px 圆角 / 22px 内边距，和其他页面对不齐，这里并回同一档 */
#appView #settingsView .panel,
#appView #settingsView .panel.settings-collapsible{padding:24px 26px;border-radius:var(--radius-lg)}
#appView .panel-head{
  margin-bottom:18px;padding-bottom:15px;border-bottom:1px solid var(--line-soft);
  align-items:center;gap:16px;
}
#appView .panel-head h3,
#appView .panel h3,
#appView .dash-panel h3,
#appView .review-section-title{
  font-size:var(--fs-section);
  font-weight:750;
  letter-spacing:-.15px;
  color:var(--ink);
  margin:5px 0 0;
}
#appView .panel-head .eyebrow{font-size:10.5px;letter-spacing:2.4px}

/* 统计卡：顶部金色细线更淡，数字更收敛 */
#appView .stat-card{
  padding:22px 24px;gap:8px;border-radius:var(--radius-lg);
  background:linear-gradient(180deg,#fff,#fcfdfe);
  box-shadow:var(--shadow-card);
}
#appView .stat-card::before{height:2px;background:linear-gradient(90deg,rgba(183,143,46,.75),rgba(217,183,107,.18) 62%,transparent)}
#appView .stat-card span{font-size:12.5px;font-weight:650;color:#5b6a80;letter-spacing:.15px}
#appView .stat-card strong{font-size:32px;font-weight:600;color:#123152;letter-spacing:-.6px}
#appView .stat-card small{font-size:12px;color:var(--muted)}

/* 快捷入口：更像按钮，弱化“方块拼贴”感 */
#appView .quick-link{
  border:1px solid var(--line);border-radius:var(--radius-md);
  background:var(--surface-2);color:#2b4a6b;font-weight:650;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
#appView .quick-link:hover{
  background:#fff;border-color:var(--gold-line);
  box-shadow:var(--shadow-sm);transform:translateY(-1px);
}
#appView .avatar{
  border-radius:var(--radius-md);
  background:linear-gradient(150deg,#e8eff6,#dbe6f1);
  color:#1b4a74;font-weight:800;
}
#appView .empty-state{padding:64px 20px;gap:10px}
#appView .empty-state b{font-size:17px;font-weight:700}

/* 进度条：更细的轨道 + 金色渐变 */
#appView .module-progress{height:10px;border-radius:999px;background:#e7edf3}
#appView .module-progress i{background:linear-gradient(90deg,#b78f2e,#e0be77)}
#appView .module-progress span{font-size:11px;font-weight:750;color:#153553}

/* 子标签（CPF / 海牙 / 邮件 / 下载）：原来 13px 与 13.5px 混用、内边距三套，这里统一 */
#appView .cpf-subtab,
#appView .download-subtab,
#appView .hague-subtab,
#appView .inbox-subtab,
#appView .neme-poa-subtab{
  font-size:13px;
  font-weight:700;
  letter-spacing:.3px;
  padding:12px 20px;
  border-radius:10px 10px 0 0;
  border-bottom:2px solid transparent;
  color:#64748b;
  background:transparent;
  transition:color .16s ease,background .16s ease,border-color .16s ease;
}
#appView #cpfModuleView .cpf-subtab,
#appView #nemePoaModuleView .neme-poa-subtab{font-size:13px;font-weight:700;padding:12px 20px}
#appView .cpf-subtab:hover,
#appView .download-subtab:hover,
#appView .hague-subtab:hover,
#appView .inbox-subtab:hover,
#appView .neme-poa-subtab:hover{color:#1f4b74;background:rgba(28,92,155,.05)}
#appView .cpf-subtab.active,
#appView .download-subtab.active,
#appView .hague-subtab.active,
#appView .inbox-subtab.active,
#appView .neme-poa-subtab.active{
  color:#0f2f51;
  background:linear-gradient(180deg,rgba(183,143,46,.10),rgba(183,143,46,0));
  border-bottom-color:var(--gold);
}
#appView #detailView .dossier-deliverables .download-subtab{border-radius:var(--radius-sm);font-size:12.5px;padding:9px 16px}

/* ---------- 7) 数据表格：统一表头、斑马纹、悬停 ---------- */
#appView .table-panel,
#appView .settings-table-wrap,
#appView .review-docs{
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  overflow:hidden;
  box-shadow:var(--shadow-card);
}
#appView .table-panel{padding:0}
#appView table{border-collapse:separate;border-spacing:0}
#appView .table-panel table th,
#appView #clientsView .table-panel table th,
#appView #settingsView .settings-table-wrap table th,
#appView .sheet-clone-table th,
#appView .review-docs th{
  font-size:var(--fs-label);
  font-weight:800;
  letter-spacing:1.15px;
  text-transform:uppercase;
  color:#5d6c81;
  background:#f6f8fb;
  padding:12px 18px;
  border-bottom:1px solid var(--line);
  text-align:left;
  white-space:nowrap;
}
#appView .table-panel table td,
#appView #settingsView .settings-table-wrap table td,
#appView .sheet-clone-table td,
#appView .review-docs td{
  padding:13px 18px;
  font-size:var(--fs-small);
  color:var(--ink-2);
  border-top:1px solid var(--line-soft);
  vertical-align:middle;
}
#appView .table-panel tbody tr:first-child td,
#appView .sheet-clone-table tbody tr:first-child td{border-top:0}
#appView .table-panel tbody tr:nth-child(even),
#appView .sheet-clone-table tbody tr:nth-child(even){background:#fcfdfe}
#appView .table-panel tbody tr:hover,
#appView .settings-table-wrap tbody tr:hover,
#appView .sheet-clone-table tbody tr:hover,
#appView .review-docs tbody tr:hover{background:#f5f9fd}
#appView .client-cell b{font-size:13.5px;font-weight:700;color:var(--ink)}
#appView .client-cell small{font-size:11.5px;color:var(--faint);letter-spacing:.3px}
/* 可横向滚动的长表格：表头吸顶 */
#appView .sheet-clone-wrap table th,
#appView .excel-preview-scroll thead th,
#appView .excel-preview-stage thead th{position:sticky;top:0;z-index:3}

/* ---------- 8) 按钮：统一高度/圆角/颜色 ---------- */
#appView .btn,
#loginView .btn{
  min-height:40px;
  padding:10px 16px;
  border-radius:var(--radius-sm);
  font-size:13px;
  font-weight:700;
  letter-spacing:.1px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease;
}
#appView .btn.small,
#loginView .btn.small{min-height:32px;padding:7px 12px;font-size:12px;border-radius:8px}
#appView .btn:hover{transform:translateY(-1px)}
#appView .btn.primary,
#loginView .btn.primary{
  background:linear-gradient(135deg,#16456f,#0a1f3a);
  color:#fff;
  box-shadow:0 8px 20px -8px rgba(10,31,58,.55),inset 0 1px 0 rgba(255,255,255,.10);
}
#appView .btn.primary:hover,
#loginView .btn.primary:hover{background:linear-gradient(135deg,#1b517f,#0d2947)}
#appView .btn.secondary{background:var(--gold-soft);border:1px solid var(--gold-line);color:var(--gold-ink)}
#appView .btn.secondary:hover{background:#f7efdd}
#appView .btn.ghost,#appView .btn.light,#appView .btn.secondary.light{
  background:#fff;border:1px solid var(--line-strong);color:#3d5169;
}
#appView .btn.ghost:hover,#appView .btn.light:hover{border-color:#c3d0de;background:#fcfdfe;color:var(--ink)}
#appView .btn.light{box-shadow:var(--shadow-sm)}
#appView .btn:disabled,#appView .btn.disabled{opacity:.5;box-shadow:none;transform:none}
#appView .btn:focus-visible,#loginView .btn:focus-visible{box-shadow:var(--focus-ring)}
#appView .text-btn{
  color:#1d5c93;font-weight:700;font-size:12.5px;
  border-radius:7px;padding:3px 7px;transition:background .16s ease,color .16s ease;
}
#appView .text-btn:hover{background:var(--info-soft);color:#14456e}

/* 表格行内操作：彩色描边按钮，删除键单独用危险色 */
#appView .row-action{
  min-height:32px;padding:7px 12px;font-size:12px;font-weight:700;
  border-radius:8px;background:#fff;border:1px solid var(--line-strong);color:#2c4b6b;
  display:inline-flex;align-items:center;gap:6px;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
#appView .row-action:hover{background:var(--info-soft);border-color:#c3d6e8;color:#16456f}
#appView .row-action.delete-action{color:var(--red);border-color:#efd6da}
#appView .row-action.delete-action:hover{background:var(--red-soft);border-color:#e6c1c7;color:#96293a}
#appView .row-actions{gap:7px;flex-wrap:wrap}

/* ---------- 9) 表单：统一高度与 focus 光圈 ---------- */
#appView .module-form input,
#appView .module-form select,
#appView .form-grid input,
#appView .form-grid select,
#appView .toolbar select,
#appView .clients-toolbar-right select,
#appView .module-client-picker select,
#appView .selected-client-summary,
#loginView .login-card input,
#loginView .login-card select,
#appView .modal input,
#appView .modal select,
#appView .modal textarea{
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:#fdfefe;
  color:var(--ink);
  font-size:13px;
  min-height:40px;
  padding:10px 13px;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
#appView .module-form input:focus,
#appView .module-form select:focus,
#appView .form-grid input:focus,
#appView .form-grid select:focus,
#appView .toolbar select:focus,
#loginView .login-card input:focus,
#appView .modal input:focus,
#appView .modal select:focus,
#appView .modal textarea:focus{
  outline:none;background:#fff;border-color:#c3a95f;box-shadow:var(--focus-ring);
}
#appView .module-form label,
#appView .form-grid label{font-size:12.5px;font-weight:650;color:#4a5a71}
#appView .module-form small,
#appView .form-grid small{font-size:11.5px;color:var(--muted);line-height:1.6}
/* 搜索框：与下拉框同高 */
#appView .search{height:40px;border-radius:var(--radius-sm);border-color:var(--line-strong);background:#fff}
#appView .search:focus-within{border-color:#c3a95f;box-shadow:var(--focus-ring)}
#appView .search input{font-size:13px}
#appView .clients-toolbar{gap:14px;padding:12px 14px;border-radius:var(--radius-lg)}

/* ---------- 10) 徽标与状态标签 ---------- */
#appView .badge,
#appView .review-badge,
#appView .pill,
#appView .chip{
  display:inline-flex;align-items:center;
  padding:4px 10px;border-radius:999px;
  font-size:11.5px;font-weight:700;letter-spacing:.2px;
  background:#eef2f7;color:#4c5c72;border:1px solid rgba(76,92,114,.12);
}
#appView .badge.done,#appView .badge.review_ready,
#appView .review-badge.passed{
  background:var(--green-soft);color:var(--green);border-color:rgba(15,122,90,.20);
}
#appView .badge.review,#appView .badge.running,#appView .badge.queued,
#appView .review-badge.review{
  background:var(--warn-soft);color:var(--warn);border-color:rgba(168,116,26,.20);
}
#appView .badge.failed,#appView .badge.needs_human,
#appView .review-badge.needs_correction,#appView .review-badge.missing{
  background:var(--red-soft);color:var(--red);border-color:rgba(178,58,74,.20);
}

/* ---------- 11) 弹窗 / 提示 / 滚动条 ---------- */
#appView dialog.modal,
#loginView dialog.modal,
.modal{border-radius:var(--radius-xl);border:1px solid var(--line);box-shadow:var(--shadow-lg)}
.modal::backdrop{background:rgba(6,17,30,.54);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.modal-head h2,.modal h2{font-size:19px;font-weight:750;letter-spacing:-.2px}
.toast{
  border-radius:var(--radius-md);
  background:linear-gradient(135deg,#12324f,#0a1e33);
  box-shadow:0 18px 44px -14px rgba(8,22,40,.55),inset 0 1px 0 rgba(255,255,255,.08);
  font-size:13px;font-weight:600;
}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:#c8d3e0;border:3px solid transparent;background-clip:content-box;border-radius:999px}
*::-webkit-scrollbar-thumb:hover{background:#aebdcd;background-clip:content-box}

/* ---------- 12) 客户档案（客户中心 → 客户档案）对齐主色 ---------- */
#detailView{
  --dossier-line:var(--line);
  --dossier-line-strong:var(--line-strong);
  --dossier-ink:var(--ink);
  --dossier-muted:var(--muted);
  --dossier-gold:var(--gold);
}
#detailView .dossier-hero{border-radius:var(--radius-lg);box-shadow:var(--shadow-card)}
#detailView .dossier-titles h2{font-size:24px;letter-spacing:-.25px}
#detailView .dossier-hero .detail-actions .btn{border-radius:var(--radius-sm);padding:10px 16px;font-size:12.5px}
#detailView .dossier-stats{border-radius:0 0 var(--radius-lg) var(--radius-lg)}
#detailView .back-btn{border-radius:var(--radius-md)}

/* ---------- 13) 响应式与动效 ---------- */
@media (max-width:1200px){
  :root{--fs-hero:24px;--fs-page:21px}
}
@media (max-width:760px){
  :root{--fs-hero:21px;--fs-page:19px;--fs-section:15px}
  #appView .panel{padding:18px 16px}
  #appView .module-hero,
  #appView #cpfModuleView .module-hero,
  #appView #nemePoaModuleView .module-hero{padding:22px 20px}
  #appView .table-panel table th,
  #appView .table-panel table td,
  #appView #settingsView .settings-table-wrap table th,
  #appView #settingsView .settings-table-wrap table td{padding:11px 13px}
  #appView .btn{min-height:38px}
}

/* ---------- 14) 可读性收口（放在文件最后，确保赢过前面所有同权重规则）----------
   实测：旧样式里有一批浅灰/浅金小字在浅色底上只有 2.4–4.3:1，达不到 WCAG AA
   的 4.5:1。这里统一提到可读档位，只改颜色明度，不改色相与版式。 */
#appView .eyebrow.dark,
#appView .panel-head .eyebrow.dark,
#appView #cpfModuleView .panel-head .eyebrow.dark,
#appView .upload-guide summary::after,
#appView .field em,
#appView .upload-slot em{color:var(--gold-ink)}

#appView #clientsTable .client-cell small.client-code,
#appView .client-code{color:var(--faint)}
#appView #clientsView .owner-filter{color:var(--muted)}

#appView #settingsView .settings-intro,
#appView .owner-cell.empty,
#appView .owner-chip.empty,
#appView #cpfModuleView .cpf-result-area .empty,
#appView #analysisModuleView .analysis-mini-empty,
#appView #handoffNotifyPanel .handoff-notify-hint,
#appView .empty,
#appView .empty-state,
#appView .notarial-empty,
#appView .doc-info small,
#appView .list-main span,
#appView .mini-job span,
#appView .module-form small,
#appView .form-grid small,
#appView .review-note,
#appView .settings-table-wrap .empty-state,
#appView .reg-success-note,
#appView .flow-source,
#appView .flow-source.none,
#appView .flow-card-meta,
#appView .flow-card-title small,
#appView .flow-card-note,
#appView .flow-card-body{color:var(--faint)}
#appView #cpfModuleView .reminder-status.muted{background:#f1f4f8;color:var(--faint)}

/* 客户摘要行、流程卡片正文：再压深一档，接近正文黑 */
#appView .selected-client-summary span,
#appView #cpfModuleView .selected-client-summary span{color:var(--muted)}
#appView .flow-card-body b,
#appView .flow-card-note b{color:#33445c}
#appView #detailView .muted,
#appView #detailView .detail-heading p,
#appView #detailView .dossier-titles p{color:var(--muted)}

/* 金色/琥珀提示文字（cpf-reset-note 原样式带 !important，这里同样用 !important 收口） */
#appView #cpfModuleView .cpf-reset-note{color:#6f5c33 !important;background:#faf7ef;border-color:#eee3c8}
#appView .cpf-result-card .notice.warning,
#appView .modal .notice{color:#7a5a12}
#appView .review-summary.review,
#appView .review-badge.review{color:#8a6116}

/* 状态徽标：底色不变，文字色统一到达标档位 */
#appView .badge.review,
#appView .badge.running,
#appView .badge.queued,
#appView .review-badge.review,
#appView .progress-chip.review,
#appView #detailView .badge.review,
#appView #detailView .badge.queued,
#appView #detailView .badge.running{
  background:var(--warn-soft);color:var(--warn);border-color:rgba(143,100,16,.22);
}
#appView .badge.done,
#appView .badge.verified,
#appView .badge.review_ready,
#appView .progress-chip.verified,
#appView .progress-chip.review_ready,
#appView .review-badge.passed{
  background:var(--green-soft);color:var(--green);border-color:rgba(15,122,90,.20);
}
#appView .badge.failed,
#appView .badge.needs_human,
#appView .review-badge.needs_correction,
#appView .review-badge.missing{
  background:var(--red-soft);color:#9c2b3c;border-color:rgba(178,58,74,.20);
}

/* 未选中的子标签 */
#appView .cpf-subtab:not(.active),
#appView .download-subtab:not(.active),
#appView .hague-subtab:not(.active),
#appView .inbox-subtab:not(.active),
#appView .neme-poa-subtab:not(.active),
#appView #cpfModuleView .cpf-subtab:not(.active),
#appView #nemePoaModuleView .neme-poa-subtab:not(.active){color:#5b6a80}

/* 客户档案里另一批浅灰/浅金小字（实测 1.7–3.4:1，达不到 AA） */
#appView #detailView .step:not(.active) span{color:var(--faint)}
#appView #detailView .dossier-stat span{color:var(--faint)}
#appView #detailView .apostille-chips .apostille-chip-text{color:var(--faint)}
#appView #detailView .intake-summary h4{color:var(--gold-ink)}
#appView #detailView .field-warning{color:#7d5a12}
/* 识别提示条原来用的是「深底浅字」的配色，但面板是白的，实测只有 1.28:1 */
#appView #detailView #recognitionHints .recognition-hint{color:#5c4a22;border-left-color:var(--gold)}
/* 「上传 / 更换」小牌子：已上传时是金底白字（2.56:1），改成金底深字（5.9:1） */
#appView #detailView .doc-slot.ready .doc-pill{color:#10243d}

/* 交付文件上传页（只有 NEME 能看到的那四个页面）里的「选择客户」标签：
   它同时带 .module-client-picker（那是给深色 hero 写的浅色字），放进白色面板后
   实测只有 1.45:1，几乎看不见 —— 这里按正文重设颜色 */
#appView .poa-picker,
#appView .module-client-picker.poa-picker{color:var(--muted)}
#appView .other-slot-hint{color:var(--faint)}

/* NEME POA 邮件卡片的发件人/时间行 */
#appView .neme-poa-meta,
#appView .neme-poa-meta span,
#appView #nemePoaModuleView .neme-poa-meta,
#appView #nemePoaModuleView .neme-poa-meta span{color:var(--faint)}

/* 搜索框里的放大镜图标原来只有 2.4:1 */
#appView .search span,
#appView .search>span,
#appView #clientsView .clients-toolbar .search>span{color:var(--faint)}

/* 兜底表格样式：业务进度面板等表格没有 .table-panel 外壳，
   表头会掉回旧版浅灰。这里只排除电子表格预览（Excel 预览）和卖家信息表，
   避免把它们 4px 内边距的密集网格改坏。 */
#appView button,
#appView a[href],
#appView input,
#appView select,
#appView textarea,
#appView summary,
#appView [tabindex]{
  /* 顶栏是 sticky 的（88px），键盘 Tab / 跳转锚点滚到元素时会被它盖住，
     留出滚动余量，聚焦目标不会被挡住 */
  scroll-margin-top:104px;
}
#appView table:not(.excel-preview-table):not(.sheet-clone-table) th{
  font-size:var(--fs-label);font-weight:800;letter-spacing:1.15px;text-transform:uppercase;
  color:#5d6c81;background:#f6f8fb;padding:12px 16px;text-align:left;white-space:nowrap;
  border-bottom:1px solid var(--line);
}
#appView table:not(.excel-preview-table):not(.sheet-clone-table) td{
  padding:12px 16px;font-size:var(--fs-small);color:var(--ink-2);
  border-top:1px solid var(--line-soft);vertical-align:middle;
}
#appView table:not(.excel-preview-table):not(.sheet-clone-table) tbody tr:nth-child(even){background:#fcfdfe}
#appView table:not(.excel-preview-table):not(.sheet-clone-table) tbody tr:hover{background:#f5f9fd}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important}
  #appView .btn:hover,#appView .quick-link:hover{transform:none}
}
