/* =====================================================================
   app.css · 三端共享样式 + 平台主题色变量
   主题色：
     - platform=web    运营  → 深蓝（权威 / 监管感）
     - platform=tenant 租户  → 蓝绿（建筑 / 业务感）
     - platform=worker 工人  → 暖橙（劳作 / 工友情）
   ===================================================================== */

:root {
  --bg:        #f5f7fb;
  --surface:   #ffffff;
  --border:    #e2e8f0;
  --text:      #1e293b;
  --text-dim:  #64748b;
  --primary:   #1e3a8a;    /* 默认 web 主题，覆盖见 .platform-* */
  --primary-2: #1e40af;
  --accent:    #f59e0b;
  --danger:    #dc2626;
  --success:   #16a34a;
  --shadow:    0 2px 10px rgba(15, 23, 42, .06);
  --radius:    10px;
}

.platform-web {
  --primary:   #1e3a8a;
  --primary-2: #1e40af;
}
.platform-tenant {
  --primary:   #0e7c66;
  --primary-2: #0a5a4a;
}
.platform-worker {
  --primary:   #d97706;
  --primary-2: #b45309;
}

/* ----- Reset ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

/* ----- Layout: Login · 现代化双栏 + 玻璃拟态 ----- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr min(440px, 92vw);
  background:
    radial-gradient(ellipse at top left, rgba(96, 165, 250, .18), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(167, 139, 250, .14), transparent 55%),
    linear-gradient(135deg, #0b1224 0%, #1a2540 50%, #0f172a 100%);
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}
.login-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
}

/* 左侧品牌区(响应式:<900px 自动隐藏) */
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
}
.brand-inner {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  z-index: 1;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-emoji {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 4px 16px rgba(245, 158, 11, .35));
}
.brand-text strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}
.brand-text small {
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.brand-slogan {
  font-size: 32px;
  line-height: 1.4;
  margin: 0;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.5px;
}
.brand-slogan em {
  font-style: normal;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.feat-ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
}
.feat-ico-web { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.feat-ico-pay { background: linear-gradient(135deg, #d97706, #f59e0b); }
.feat-ico-shield { background: linear-gradient(135deg, #0e7c66, #10b981); }
.feat-body b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 2px;
}
.feat-body small {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}
/* ★ R363 的租户登录页整页背景图已被 R364 设计稿重排取代
   （样式移至 public/tenant/assets/login.css，scoped: body.platform-tenant） */
.brand-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.brand-foot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: brand-pulse 2s infinite;
}
@keyframes brand-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* 右侧登录卡 */
.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, .06);
  position: relative;
  z-index: 1;
}
.login-head { margin-bottom: 28px; }
.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.login-badge-web {
  background: rgba(30, 58, 138, .25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, .3);
}
.login-badge-tenant {
  background: rgba(14, 124, 102, .25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, .3);
}
.login-badge-worker {
  background: rgba(217, 119, 6, .25);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, .3);
}
.login-card h1 {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.login-card p.subtitle {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

/* 表单字段(上浮 label) */
.login-form .field {
  position: relative;
  margin-bottom: 14px;
}
.login-form .field input {
  width: 100%;
  padding: 16px 14px 16px 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.login-form .field input::placeholder { color: transparent; }
.login-form .field label {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #64748b;
  pointer-events: none;
  transition: all .15s ease;
}
.login-form .field input:focus,
.login-form .field input:not(:placeholder-shown) {
  border-color: var(--primary);
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.login-form .field input:focus + label,
.login-form .field input:not(:placeholder-shown) + label {
  top: 0;
  left: 12px;
  transform: translateY(-50%) scale(.85);
  background: #0f172a;
  padding: 0 6px;
  color: var(--primary);
  font-weight: 500;
}
.login-form .field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}
.login-form .field-code {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.login-form .field-code > .field {
  flex: 1;
  margin-bottom: 0;
}
.login-form .field-action {
  white-space: nowrap;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
}
.login-form .field-action:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .2);
}
.login-form .field-action:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.login-form .primary {
  width: 100%;
  padding: 14px;
  margin-top: 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  border: 0;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 58, 138, .35);
  transition: transform .1s, box-shadow .15s;
}
.login-form .primary:hover {
  box-shadow: 0 6px 20px rgba(30, 58, 138, .5);
  transform: translateY(-1px);
}
.login-form .primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(30, 58, 138, .3);
}
.login-form .primary:disabled {
  background: #475569;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.login-form .primary-arrow {
  transition: transform .2s;
}
.login-form .primary:hover .primary-arrow {
  transform: translateX(3px);
}

.login-form .err {
  color: #fca5a5;
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
  padding: 0 4px;
}
/* R204 · 发码成功提示(真短信通道:验证码真发到手机,不再自动回填明文) */
.login-form .err.ok {
  color: #6ee7b7;
}
.login-form .hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 14px;
  text-align: center;
}
.login-form .hint .code {
  color: #fbbf24;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 1px 6px;
  background: rgba(251, 191, 36, .1);
  border-radius: 3px;
  margin-left: 4px;
}

/* Portal switch · chip 风格 */
.portal-switch {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, .08);
}
.portal-switch .lbl {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.portal-switch .chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.portal-switch .chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  color: #e2e8f0;
  transition: all .15s;
}
.portal-switch .chip:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .15);
  transform: translateY(-1px);
}
.portal-switch .chip-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 5px;
  border-radius: 3px;
}
.portal-switch .chip-tag-tenant {
  background: rgba(14, 124, 102, .25);
  color: #6ee7b7;
}
.portal-switch .chip-tag-worker {
  background: rgba(217, 119, 6, .25);
  color: #fcd34d;
}
.portal-switch .chip-tag-web {
  background: rgba(30, 58, 138, .25);
  color: #93c5fd;
}
.portal-switch .chip-name {
  flex: 1;
  font-weight: 500;
}
.portal-switch .chip-arrow {
  color: #64748b;
  font-size: 14px;
  transition: transform .2s, color .2s;
}
.portal-switch .chip:hover .chip-arrow {
  transform: translateX(3px);
  color: #fff;
}

/* R51 · 开发模式一键登录面板(暗色 + 紫调) */
.dev-panel {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(168, 85, 247, .08));
  border: 1px dashed rgba(168, 85, 247, .3);
  text-align: left;
}
.dev-panel[hidden] { display: none; }
.dev-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.dev-panel-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7;
  animation: brand-pulse 2s infinite;
}
.dev-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: #c084fc;
  letter-spacing: 0.5px;
}
.dev-panel-tip {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 10px;
  line-height: 1.5;
}
.dev-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.dev-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(15, 23, 42, .6);
  cursor: pointer;
  transition: all .15s;
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 500;
  text-align: left;
}
.dev-btn:hover {
  border-color: rgba(168, 85, 247, .5);
  background: rgba(99, 102, 241, .1);
  transform: translateY(-1px);
}
.dev-btn:active { transform: translateY(0); }
.dev-btn:disabled { opacity: .5; cursor: wait; }
.dev-btn-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.dev-btn-web    .dev-btn-tag { background: rgba(30, 58, 138, .35);  color: #93c5fd; }
.dev-btn-tenant .dev-btn-tag { background: rgba(14, 124, 102, .35); color: #6ee7b7; }
.dev-btn-worker .dev-btn-tag { background: rgba(217, 119, 6, .35); color: #fcd34d; }
.dev-btn-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 2px;
}
.dev-btn-sub {
  font-size: 10px;
  color: #94a3b8;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: normal;
}
.dev-panel-status {
  font-size: 11px;
  margin-top: 8px;
  min-height: 14px;
  color: #94a3b8;
}
.dev-panel-status.is-err { color: #fca5a5; }
.dev-panel-status.is-ok  { color: #6ee7b7; }

/* 响应式:窄屏(<900px)折叠左侧品牌区 */
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-card {
    border-left: none;
    padding: 32px 24px;
  }
}

/* ----- Layout: App ----- */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  background: var(--bg);
}
.topbar {
  grid-area: topbar;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
}
.topbar .brand {
  font-weight: 600;
  color: var(--primary);
}
.topbar .crumbs {
  color: var(--text-dim);
  font-size: 13px;
  /* ★ R302 · 顶栏面包屑不换行（原「工作内容」被折成「工作内 容」两行） */
  white-space: nowrap;
}
.topbar .spacer { flex: 1; }
.topbar .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 12px;
}
.topbar .user-chip .role {
  background: var(--primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
}
.topbar .portal-pick {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.topbar .portal-pick a {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-dim);
}
.topbar .portal-pick a.active {
  background: var(--primary);
  color: #fff;
}
.topbar button.link {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 12px;
}
.topbar button.link:hover { color: var(--text); }

/* ---- R199 · 顶栏租户组切换器 ---- */
.topbar .tenant-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.topbar .tenant-switch[hidden] { display: none !important; }
.topbar .tenant-switch-label {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.topbar .tenant-switch select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
  max-width: 260px;
}
.topbar .tenant-switch select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.topbar .tenant-switch-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  white-space: nowrap;
}
.topbar .tenant-switch-badge[hidden] { display: none !important; }

.sidebar {
  grid-area: sidebar;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.sidebar .group {
  border-bottom: 1px solid var(--border);
}
.sidebar .group:last-child { border: 0; }
.sidebar .group-head {
  padding: 14px 18px 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar .group-head .toggle {
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}
.sidebar li a {
  display: block;
  padding: 8px 18px 8px 28px;
  font-size: 13px;
  color: var(--text-dim);
  border-left: 3px solid transparent;
}
.sidebar li a:hover { color: var(--text); background: #f8fafc; }
.sidebar li a.active {
  color: var(--primary);
  background: rgba(30, 58, 138, .06);
  border-left-color: var(--primary);
  font-weight: 500;
}

.sidebar.worker {
  /* 工人端做移动端布局 */
  width: auto;
  border-right: 0;
}
.sidebar.worker .group {
  border: 0;
}
.sidebar.worker .group-head {
  padding: 12px 18px;
  background: #fafbfc;
}
.sidebar.worker ul { padding-bottom: 12px; }
.sidebar.worker li a {
  padding: 12px 18px;
  font-size: 14px;
}

/* R168 · worker 端"工作内容"组门控(无在岗项目时整组不可进入) */
.sidebar.worker .group.locked .group-head { opacity: 0.6; }
.sidebar.worker .group.locked .group-head span:first-child { color: #9ca3af; }
.sidebar li a.locked {
  color: #cbd5e1 !important;
  cursor: not-allowed;
  pointer-events: auto;        /* 保留 click 用于 toast 提示 */
  background: transparent;
}
.sidebar li a.locked::before {
  content: '🔒 ';
  font-size: 12px;
  margin-right: 4px;
}
.sidebar li a.locked:hover {
  background: #fef2f2;
  color: #cbd5e1 !important;
}

/* R168 · worker 端"无在岗项目"门控页(替换 #/work/* 内容) */
.gate-section {
  max-width: 480px;
  margin: 40px auto;
  padding: 36px 28px;
  background: #fff;
  border: 1px solid #fde68a;
  border-top: 4px solid #f59e0b;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  text-align: center;
}
.gate-icon { font-size: 48px; line-height: 1; margin-bottom: 12px; }
.gate-title { font-size: 20px; font-weight: 700; color: #991b1b; margin: 0 0 10px; }
.gate-text { font-size: 14px; color: #4b5563; line-height: 1.6; margin: 0 0 16px; }
.gate-reasons {
  list-style: disc;
  text-align: left;
  font-size: 13px;
  color: #6b7280;
  padding-left: 22px;
  margin: 0 0 24px;
  line-height: 1.7;
}
.gate-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.gate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s;
}
.gate-btn.primary { background: #ea580c; color: #fff; border-color: #ea580c; }
.gate-btn.primary:hover { background: #c2410c; border-color: #c2410c; }
.gate-btn.ghost { background: #fff; color: #4b5563; border-color: #d1d5db; }
.gate-btn.ghost:hover { background: #f3f4f6; border-color: #9ca3af; }
.gate-tip { font-size: 11.5px; color: #9ca3af; margin: 0; }

@media (max-width: 480px) {
  .gate-section { margin: 16px; padding: 28px 18px; }
  .gate-icon { font-size: 36px; }
  .gate-title { font-size: 17px; }
  .gate-cta { flex-direction: column; }
  .gate-btn { width: 100%; justify-content: center; }
}

.main {
  grid-area: main;
  padding: 22px 26px;
  overflow: auto;
}
.main h1 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
}
.main .placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--text-dim);
  text-align: center;
}
.main .empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  color: var(--text-dim);
  text-align: center;
}

/* ----- Mobile (worker) ----- */
@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 56px auto 1fr;
    grid-template-areas:
      "topbar"
      "sidebar"
      "main";
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
}

/* ----- Misc ----- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f1f5f9;
  color: var(--text-dim);
}
.tag.admin { background: #fef3c7; color: #92400e; }
.tag.foreman { background: #dbeafe; color: #1e40af; }
.tag.worker  { background: #dcfce7; color: #166534; }

.code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #0f172a;
  color: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ----- 项目与工地页 ----- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 16px;
  gap: 16px;
  min-height: 38px;
}
.page-head .page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.page-head .primary {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

/* R143 · Tab 切换器 */
.tab-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: #f1f5f9;
  border-radius: 8px;
}
.tab-switch a {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.tab-switch a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, .04);
}
.tab-switch a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

/* R143 · 单元格色（待抵扣高亮） */
.cell-warn { color: #d97706; font-weight: 500; }
.pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: middle;
  margin-left: 2px;
}
.pill-warn { background: #fef3c7; color: #92400e; }
.page-head .primary:hover { background: var(--primary-2); }

/* R120 · 项目与工地 KPI 行 + 筛选条 + 状态徽标 */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--border, #e5e7eb);
}
.kpi-card.kpi-active::before  { background: #10b981; }   /* 绿 */
.kpi-card.kpi-closed::before  { background: #f59e0b; }   /* 橙 */
.kpi-card.kpi-workers::before { background: #3b82f6; }   /* 蓝 */
/* R121 · 工作布置 KPI 配色 */
.kpi-card.kpi-total::before     { background: #6366f1; }
.kpi-card.kpi-draft::before     { background: #94a3b8; }
.kpi-card.kpi-published::before { background: #10b981; }
.kpi-card.kpi-month::before     { background: #3b82f6; }
/* R125 ~ R128 · 新 KPI 配色 */
.kpi-card.kpi-pending::before   { background: #f59e0b; }   /* 橙 */
.kpi-card.kpi-rejected::before  { background: #ef4444; }   /* 红 */
.kpi-card.kpi-today::before     { background: #0ea5e9; }   /* 天蓝 */
/* R131 ~ R133 · 资金/合规 KPI 配色 */
.kpi-card.kpi-attend::before    { background: #14b8a6; }   /* 青绿 - 出勤 */
.kpi-card.kpi-zero::before      { background: #94a3b8; }   /* 浅灰 - 零工资 */
.kpi-card.kpi-cert::before      { background: #3b82f6; }   /* 蓝 - 已传证件 */
.kpi-card.kpi-audit::before     { background: #f59e0b; }   /* 橙 - 待审核 */
.kpi-label {
  font-size: 12px;
  color: var(--text-dim, #6b7280);
  letter-spacing: 0.3px;
}
.kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text, #111827);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  line-height: 1.2;
}

/* 筛选条 */
.proj-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group-grow { flex: 1 1 auto; min-width: 200px; }
.filter-label {
  font-size: 12px;
  color: var(--text-dim, #6b7280);
  font-weight: 500;
  white-space: nowrap;
}
.filter-select,
.filter-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--text, #111827);
  outline: none;
  font-family: inherit;
}
.filter-select { min-width: 120px; }
.filter-input  { flex: 1 1 auto; min-width: 180px; }
.filter-select:focus,
.filter-input:focus  { border-color: var(--primary, #1677ff); }
.filter-hint {
  font-size: 12px;
  color: var(--text-dim, #6b7280);
  white-space: nowrap;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

/* 状态徽标(替代原"参保情况"列视觉) */
.proj-table .status-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}
.proj-table .status-tag.st-on {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.proj-table .status-tag.st-off {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.proj-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 20px;
  margin: 0 0 18px;             /* 紧贴 main 左对齐，不强行居中 */
}
.section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  letter-spacing: 0.2px;
}
.proj-table-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.proj-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}
/* R120 · 8 列固定比例（合计 100%）
   项目名称 14 | 项目地址 22 | 状态 8 | 工人数 6 | 管理 9 | 人工费用 18 | 证书 9 | 操作 14
   · "参保情况"列改为"状态"列(从 p.status 派生,与原列同语义,视觉统一为徽标)
   · 操作列从 10% 加到 14%，塞下"编辑 + 删除"双按钮（pd 不被竖排）
   · 人工费用列 18% 居中保留（v65 已精确居中） */
.proj-table col.c-name    { width: 14%; }
.proj-table col.c-addr    { width: 22%; }
.proj-table col.c-status  { width: 8%;  }
.proj-table col.c-wcnt    { width: 6%;  }
.proj-table col.c-mcnt    { width: 9%;  }
.proj-table col.c-sal     { width: 18%; }
.proj-table col.c-cert    { width: 9%;  }
.proj-table col.c-act     { width: 14%; }
.proj-table thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-dim);
  background: #fafbfc;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 12px;
}
/* R93 · 数字列(工人数/管理人数/人工费用/员工证书数)表头 + 数据统一居中
   · 与"状态/操作"列同样节奏,数字居中,扫描时同列垂直对齐
   · 视觉重量均匀,不再右贴边 */
.proj-table thead th.col-num    { text-align: center; }
.proj-table thead th.col-cert   { text-align: center; }
.proj-table thead th.col-sal    { text-align: center; }
.proj-table thead th.col-status { text-align: center; }   /* "在建/停用"徽标居中 */
.proj-table thead th.col-act    { text-align: center; }
.proj-table tbody td.col-num,
.proj-table tbody td.col-cert { text-align: center; }
.proj-table tbody td.row-act  { text-align: center; }
.proj-table .row-edit-btn {
  padding: 3px 10px;
  font-size: 12px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;        /* R91 · 防按钮文字竖排 */
  transition: background .12s, color .12s;
}
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.proj-table .row-edit-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* R89 · "操作"列改为双按钮(编辑 + 删除) */
.proj-table .act-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.proj-table .row-del-btn {
  padding: 3px 10px;
  font-size: 12px;
  border: 1px solid #ff4d4f;
  color: #ff4d4f;
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;        /* R91 · 防按钮文字竖排 */
  transition: background .12s, color .12s;
}
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.proj-table .row-del-btn:hover {
  background: #ff4d4f;
  color: #ffffff;
}

/* ============== R89 · 删除项目确认弹窗 =============== */
.modal-box-danger { border-top: 4px solid #ff4d4f; }
.modal-box-danger .del-title { color: #ff4d4f; margin-bottom: 8px; }
.modal-box-danger .del-target {
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #ad6800;
  line-height: 1.5;
  word-break: break-all;
}
.modal-box-danger .del-target b { color: #d4380d; font-weight: 600; }
.modal-box-danger .del-target code {
  font-size: 11px;
  background: rgba(255,255,255,.6);
  padding: 1px 4px;
  border-radius: 3px;
}
.modal-box-danger .del-warn-title {
  font-size: 13px;
  font-weight: 600;
  color: #ff4d4f;
  margin: 4px 0 6px;
}
.modal-box-danger .del-confirm-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  border: 1px solid #ffd6d6;
  border-radius: 4px;
  background: #fff1f0;
  overflow: hidden;
}
.modal-box-danger .del-confirm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  color: #5c0011;
  border-bottom: 1px solid #ffe0e0;
}
.modal-box-danger .del-confirm-item:last-child { border-bottom: 0; }
.modal-box-danger .del-confirm-k { color: #5c0011; }
.modal-box-danger .del-confirm-v {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #cf1322;
}
.modal-box-danger .del-warn-tip {
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.6;
  background: #fafafa;
  border-left: 3px solid #d9d9d9;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 0 4px 4px 0;
}
.modal-box-danger .del-input-row {
  display: block;
  margin-bottom: 12px;
}
.modal-box-danger .del-input-lbl {
  display: block;
  font-size: 12px;
  color: #595959;
  margin-bottom: 4px;
}
.modal-box-danger .del-input-lbl b {
  color: #ff4d4f;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: #fff1f0;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 2px;
}
.modal-box-danger #delProjInput {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.modal-box-danger #delProjInput:focus { border-color: #ff4d4f; }
.modal-actions button.danger {
  background: #ff4d4f;
  border-color: #ff4d4f;
  color: #ffffff;
}
.modal-actions button.danger:hover:not(:disabled) { background: #d4380d; border-color: #d4380d; }
.modal-actions button.danger:disabled {
  background: #ffccc7;
  border-color: #ffccc7;
  color: #fff;
  cursor: not-allowed;
}
.proj-table tbody td {
  padding: 11px 12px;                    /* 14 → 11，让列更紧凑 */
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-break: break-word;
}
.proj-table tbody tr:last-child td { border-bottom: 0; }
/* R93 · 数字列与表头统一居中 */
.proj-table .num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.proj-table .ins-cell { text-align: center; }
/* R93 · 人工费用列改居中(与"工人数/管理/证书"同步);
   salary-amount 仍以 inline-block 保 "¥xxx" 与 "—" 同样宽度基线,居中后视觉对齐 */
.proj-table .salary-cell-wrap {
  text-align: center;
  vertical-align: middle;
}
.proj-table .salary-amount {
  display: inline-block;
  font-weight: 500;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  /* 占位符 "—" 也需要与 ¥xxx 同样的对齐基线 */
  font-feature-settings: "tnum";
}
.proj-table .salary-amount.is-empty {
  color: var(--text-dim);
  font-weight: 400;
}
.proj-table .row-name {
  color: var(--text);
  font-weight: 400;
}
/* R221 · 项目资料副标题（工程属性 · 建筑面积） */
.proj-table .row-profile {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
}

.tag.ins-on  { background: #dcfce7; color: #166534; }
.tag.ins-off { background: #f1f5f9; color: #64748b; }
.tag.insurance { padding: 2px 10px; border-radius: 999px; font-size: 11px; }

.loading {
  padding: 36px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 兜底：即使有其他规则试图覆盖，hidden 父容器必须彻底隐藏（含子 mask） */
.modal[hidden],
.modal[hidden] * { display: none !important; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
}
/* 通用 modal-overlay：覆盖全屏 + 半透明背景 + flex 居中
   用于 realname.js 的审核弹窗和图片预览弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-overlay-in .15s ease-out;
}
.modal-overlay[hidden] { display: none !important; }
@keyframes modal-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 460px;
  max-width: 92vw;
  padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
.modal-box.modal-box-wide {
  width: 720px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.modal-box .form-grid-2 > label.form-full {
  grid-column: 1 / -1;
}
.modal-box h3 {
  margin: 0 0 16px;
  font-size: 16px;
}
.modal-box label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.modal-box label input {
  display: block;
  margin-top: 4px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}
.modal-box label input:focus {
  outline: none;
  border-color: var(--primary);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.modal-actions button {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.modal-actions button:hover {
  border-color: var(--text-dim);
}
.modal-actions button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.modal-actions button.primary:hover { background: var(--primary-2); }
.modal-actions button.primary:disabled { background: #94a3b8; border-color: #94a3b8; cursor: not-allowed; }

/* ============== 第 19 轮：新增项目 modal · 省市区三联下拉 ============== */
.modal-box .req {
  color: var(--danger);
  font-weight: 600;
  margin-right: 2px;
}
.modal-box .lbl {
  color: var(--text);
  font-size: 13px;
  margin-right: 4px;
}
.modal-box label input,
.modal-box label select {
  display: block;
  margin-top: 4px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
}
.modal-box label select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>")
    no-repeat right 10px center;
  padding-right: 32px;
}
.modal-box label select:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
.modal-box label input:focus,
.modal-box label select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .12);
}
.addr-block { margin-bottom: 12px; }
.addr-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.addr-cell {
  display: block;
  margin: 0 !important;
}
.addr-cell .lbl,
.addr-detail .lbl {
  display: block;
  margin-bottom: 0;
  color: var(--text-dim);
  font-size: 12px;
}
.addr-detail { display: block; }

/* ----- R221 · 项目资料（工程属性 / 建筑面积 / 填写说明） ----- */
.proj-fill-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #dbeafe;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.6;
}
.proj-fill-tip-ico {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.4;
}
.area-input-wrap {
  position: relative;
  display: block;
}
.area-input-wrap input {
  padding-right: 34px;
}
.area-input-unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 13px;
  pointer-events: none;
}
.modal-box .err {
  color: var(--danger);
  font-size: 12px;
  min-height: 16px;
  margin-top: 6px;
}

/* ===================================================================
   工人花名册（roster）
   =================================================================== */
.roster-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 22px;
  margin: 0 0 18px;             /* 紧贴 main 左对齐，不强行居中（与 .proj-section 一致） */
}

/* R150：工人管理 (花名册) 顶部实名未通过工人提示 banner */
.roster-audit-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #fff7e6;
  border: 1px solid #fde0a1;
  border-radius: 8px;
  color: #b45309;
  font-size: 13px;
  line-height: 1.6;
}
.roster-audit-banner[hidden] { display: none; }
.roster-audit-banner-inner { display: flex; align-items: flex-start; gap: 10px; }
.roster-audit-banner .ico {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  background: #f59e0b; color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.roster-audit-banner .msg { flex: 1; }
.roster-audit-banner b { color: #92400e; font-weight: 700; }
.roster-audit-banner a.link { color: #b45309; text-decoration: underline; margin: 0 2px; }
.roster-audit-banner a.link:hover { color: #92400e; }

.roster-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.roster-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
/* R122 · 工人管理 · filter 搜索框样式 */
.roster-pick-grow { flex: 1; min-width: 200px; }
.roster-toolbar .roster-input {
  flex: 1;
  height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
.roster-toolbar .roster-input:focus {
  outline: none;
  border-color: var(--primary);
}
.roster-pick .lbl {
  font-weight: 500;
  color: var(--text);
}
.roster-select {
  min-width: 280px;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>")
    no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.roster-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

/* v=22 新增 · 班组下拉（窄一些，靠项目下拉右侧）*/
.roster-select-team {
  min-width: 200px;
}

.roster-meta-team {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: var(--primary-soft, #eef2ff);
  color: var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.roster-toolbar .primary {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.roster-toolbar .primary:hover { background: var(--primary-2); }
/* v=20 移除 :disabled 灰样式（按钮始终可点，由 JS 在 click 时检查项目并提示） */

/* v=19 新增 · roster-toolbar 多按钮排布 */
.roster-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.roster-toolbar .secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.roster-toolbar .secondary:hover {
  background: rgba(37, 99, 235, .06);
}
/* v=20 移除 .secondary:disabled 灰样式（按钮始终可点） */
.roster-toolbar .ghost {
  background: transparent;
  color: var(--text-dim);
  border: 0;
  padding: 8px 8px 8px 4px;
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.roster-toolbar .ghost:hover { color: var(--primary); text-decoration: underline; }

/* v=19 toast 通用（也兼容其他屏复用） */
.roster-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: 480px;            /* v=20 默认宽度（适合短消息） */
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;           /* v=20 多行错误时行距 */
  white-space: pre-wrap;       /* v=20 保留 \n 换行 */
  box-shadow: 0 6px 24px rgba(15, 23, 42, .14);
  border-left: 4px solid #94a3b8;
  background: #fff;
  color: var(--text);
  animation: rosterToastIn .18s ease-out;
}
.roster-toast.toast-success { border-left-color: #0e7c66; background: #ecfdf5; color: #0f3b34; }
.roster-toast.toast-warn    { border-left-color: #d97706; background: #fffbeb; color: #7c2d12; }
.roster-toast.toast-error   { border-left-color: #dc2626; background: #fef2f2; color: #7f1d1d; max-width: 560px; }   /* v=20 加宽让多行错误能完整展示 */
.roster-toast.toast-info    { border-left-color: #2563eb; background: #eff6ff; color: #1e3a8a; }
@keyframes rosterToastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.roster-meta {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding: 0 2px;
}
.roster-meta strong { color: var(--text); font-weight: 600; }

.roster-table-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.roster-table-scroll {
  width: 100%;
  max-height: 460px;            /* 固定高度：thead ~39px + 10 行 × ~41px = 449 */
  overflow: auto;               /* x 与 y 都滚；宽度仍随平台自适应 */
  position: relative;
  scrollbar-gutter: stable;
}
/* 滚动条：紧凑、灰阶，避免占太多横向空间（与 realname 表一致） */
.roster-table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.roster-table-scroll::-webkit-scrollbar-track { background: transparent; }
.roster-table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.roster-table-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.roster-table-scroll { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

.roster-table {
  width: 100%;
  min-width: 1400px;           /* 保证列不会塌陷 */
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;          /* 列宽严格按 colgroup，避免被内容拉伸 */
}

/* 10 列比例（合计 100%）
   参照 projects 的"标识+长内容宽、短内容窄"节奏（17/26/6/10/9/20/12）：
     · 姓名加宽（9%）：3 字姓名不溢出
     · 住址最宽（17%）：完整显示省市区+详细地址
     · 身份证/银行卡 12%：18~19 位数字有足够空间
     · 班组/工种 7%：tag 居中可读
   旧版：6/8/4/11/12/14/19/6/6/14 — 姓名太窄、户口过宽、长数字列拥挤 */
.roster-table col.c-name    { width: 8%;  }
.roster-table col.c-phone   { width: 8%;  }
.roster-table col.c-age     { width: 5%;  }
.roster-table col.c-id      { width: 10%; }
.roster-table col.c-bank    { width: 10%; }
.roster-table col.c-bankn   { width: 6%;  }
.roster-table col.c-bankno  { width: 6%;  }   /* R36：行号（CNAPS 联行号） */
.roster-table col.c-home    { width: 13%; }
.roster-table col.c-team    { width: 7%;  }
.roster-table col.c-job     { width: 5%;  }
.roster-table col.c-pos     { width: 6%;  }   /* R59：职位（普工/技工/班组长…） */
.roster-table col.c-joined  { width: 10%; }
.roster-table col.c-act     { width: 6%;  }   /* R58：操作（编辑按钮） */
/* 合计：8+8+5+10+10+6+6+13+7+5+6+10+6 = 100% */

.roster-table thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-dim);
  background: #fafbfc;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 12px;
  position: sticky;            /* 滚动时表头钉在顶部，10 行固定区域始终有列名 */
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--border);   /* 防止 tbody 滚到顶部时被遮 */
}
.roster-table thead th.col-center { text-align: center; }
.roster-table thead th.col-left   { text-align: left;   }

.roster-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;          /* 单行不换行，长内容用 overflow 隐藏 */
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-table tbody tr:last-child td { border-bottom: 0; }
.roster-table tbody tr:hover { background: #f8fafc; }

.roster-table thead th.col-act { text-align: center; }
.roster-table tbody td.row-act {
  text-align: center;
  white-space: nowrap;
  overflow: visible;             /* 覆盖父级 nowrap，避免按钮被裁 */
}
.roster-row-edit-btn {
  padding: 3px 12px;
  font-size: 12px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.roster-row-edit-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* R150：实名审核未通过的工人，编辑按钮禁用 + 行变灰 + 行尾徽章 */
.roster-row-edit-btn[disabled] {
  background: #f1f5f9; border-color: #cbd5e1; color: #94a3b8;
  cursor: not-allowed;
}
.roster-row-edit-btn[disabled]:hover {
  background: #f1f5f9; color: #94a3b8;
}
.roster-table tbody tr.row-audit-blocked { background: #f8fafc; }
.roster-table tbody tr.row-audit-blocked td { color: var(--text-dim); }

.audit-badge {
  display: inline-block; margin-left: 6px;
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; line-height: 1.6;
  border: 1px solid transparent; vertical-align: middle;
}
.audit-badge.audit-approved { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.audit-badge.audit-pending  { background: #fff7e6; color: #b45309; border-color: #fde68a; }
.audit-badge.audit-rejected { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.audit-badge.audit-expired  { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

/* R170 · 系统自动打回标记(7 天无考勤)*/
.r170-mark {
  display: inline-block;
  margin-right: 4px;
  color: #ea580c;
  font-weight: 700;
  cursor: help;
}

/* R170 · 实名管理页规则工具条 */
.realname-r170-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.realname-r170-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  color: #475569;
}
.realname-r170-switch input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #ea580c;
  cursor: pointer;
}
.realname-r170-banner {
  margin: 0 24px 12px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.realname-r170-banner--on  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.realname-r170-banner--off { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.realname-r170-banner--err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.roster-table .col-left   { text-align: left;   }
.roster-table .col-center { text-align: center; }

.roster-table .mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: -0.1px;
}

/* chip 样式：缩小 padding 让 "钢筋工" / "项目经理" 在 7% 列（约 87px）下不溢出 */
.roster-table .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  white-space: nowrap;
  max-width: 100%;
}
.roster-table .tag.team     { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }
.roster-table .tag.job      { background: #ecfeff; color: #0e7490; border-color: #cffafe; }
.roster-table .tag.position { background: #fff7ed; color: #c2410c; border-color: #ffedd5; }   /* R59 */

.roster-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* ============== v=16 · 工人花名册占位表（10 行骨架） ============== */
.roster-skel-wrap {
  position: relative;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 8px);
  overflow: hidden;
  width: 100%;          /* 宽度跟随平台（响应式） */
}
.roster-skel {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.roster-skel thead th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--text, #1d2129);
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
}
.roster-skel-row {
  /* 固定高度 48px / 10 行 = 480px 总高 */
  height: 48px;
}
.roster-skel-row td {
  padding: 10px 8px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  color: var(--text-dim, #6b7280);
  text-align: left;
  background: #fafafa;
}
.roster-skel-row:hover td {
  background: #f5f5f5;
}
.roster-skel .skel-cell {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .05em;
}
.roster-skel-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(0.5px);
}
.roster-skel-hint::before {
  content: '↑';
  margin-right: 6px;
  font-size: 16px;
  color: #9ca3af;
}

/* ===================================================================
   实名登记（realname）· 运营管理 → 实名登记
   15 列布局：姓名/电话/年龄/身份证/银行卡/开户行/住址/班组长/
            工种/进场时间 + 4 张缩略图 + 审核状态
   =================================================================== */
.realname-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 22px;
  margin: 0 0 18px;             /* 紧贴 main 左对齐，不强行居中（与 .proj-section 一致） */
}

.realname-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.realname-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
/* R123 · 实名管理 · filter 搜索框样式 */
.realname-pick-grow { flex: 1; min-width: 200px; }
.realname-toolbar .realname-input {
  flex: 1;
  height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
.realname-toolbar .realname-input:focus {
  outline: none;
  border-color: var(--primary);
}
.realname-pick .lbl { font-weight: 500; color: var(--text); }

.realname-select {
  min-width: 280px;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>")
    no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.realname-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 102, .15);
}

.realname-toolbar .primary {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.realname-toolbar .primary:hover:not(:disabled) { background: var(--primary-2); }
.realname-toolbar .primary:disabled { background: #94a3b8; cursor: not-allowed; }

.realname-subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin: 4px 0 14px;
}

/* R215 · 审核通过后才计入考勤与工资 的规则提示 */
.realname-rule-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.7;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.realname-rule-tip b { font-weight: 700; color: #1d4ed8; }

/* 状态统计 chip 行 */
.realname-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}
.stat-chip strong { font-weight: 600; }
.stat-chip.stat-total    { background: #f1f5f9; color: #1e293b; border-color: #e2e8f0; }
.stat-chip.stat-pending  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.stat-chip.stat-approved { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.stat-chip.stat-rejected { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.stat-chip.stat-expired  { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }

.realname-meta {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding: 0 2px;
}
.realname-meta strong { color: var(--text); font-weight: 600; }

.realname-table-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.realname-table-scroll {
  width: 100%;
  max-height: 460px;            /* 固定高度：thead ~39px + 10 行 × ~41px = 449 */
  overflow: auto;               /* x 与 y 都滚；宽度仍随平台自适应 */
  position: relative;
  scrollbar-gutter: stable;
}
/* 滚动条：紧凑、灰阶，避免占太多横向空间 */
.realname-table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.realname-table-scroll::-webkit-scrollbar-track { background: transparent; }
.realname-table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.realname-table-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.realname-table-scroll { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

.realname-table {
  width: 100%;
  min-width: 1500px;           /* 保证 15 列不塌陷 */
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

/* 16 列比例（合计 100%）
   复用 roster 的命名空间:c-name c-phone c-age c-id c-bank c-bankn c-home c-team c-job c-joined
   c-thumb × 4 + c-audit + c-oneclick (R151)
   R151 增加「一键通过」列,缩略图/银行卡/住址/审核状态各下调,保证总宽 100% */
.realname-table col.c-name     { width: 7%;  }
.realname-table col.c-phone    { width: 7%;  }
.realname-table col.c-age      { width: 4%;  }
.realname-table col.c-id       { width: 9%;  }
.realname-table col.c-bank     { width: 8%;  }   /* R151: 10% → 8% */
.realname-table col.c-bankn    { width: 8%;  }
.realname-table col.c-home     { width: 12%; }   /* R151: 13% → 12% */
.realname-table col.c-team     { width: 5%;  }
.realname-table col.c-job      { width: 5%;  }
.realname-table col.c-joined   { width: 9%;  }
.realname-table col.c-thumb    { width: 3%;  }   /* R151: 3.5% → 3% (×4 → 12%) */
.realname-table col.c-audit    { width: 7%;  }   /* R151: 9% → 7% */
.realname-table col.c-oneclick { width: 7%;  }   /* R151 新增:一键通过列 */
/* 合计:7+7+4+9+8+8+12+5+5+9+12+7+7 = 100% */

.realname-table thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-dim);
  background: #fafbfc;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 12px;
  position: sticky;            /* 滚动时表头钉在顶部，10 行固定区域始终有列名 */
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--border);   /* 防止 tbody 滚到顶部时被遮 */
}
.realname-table thead th.col-center { text-align: center; }
.realname-table thead th.col-left   { text-align: left;   }

.realname-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.realname-table tbody tr:last-child td { border-bottom: 0; }
.realname-table tbody tr:hover { background: #f8fafc; }

.realname-table .col-left   { text-align: left;   }
.realname-table .col-center { text-align: center; }

.realname-table .mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: -0.1px;
}

.realname-table .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  white-space: nowrap;
  max-width: 100%;
}
.realname-table .tag.team { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }
.realname-table .tag.job  { background: #ecfeff; color: #0e7490; border-color: #cffafe; }

/* 缩略图占位 SVG —— 已上传显示真实图片，未上传显示占位 */
.realname-table .thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: transform .15s, box-shadow .15s;
  overflow: hidden;
}
.realname-table .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.realname-table .thumb-ok {
  background: #eff6ff;
  cursor: zoom-in;
  box-shadow: 0 0 0 1px #bfdbfe;
}
.realname-table .thumb-ok:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px #3b82f6, 0 2px 8px rgba(59,130,246,.25);
}
.realname-table .thumb-empty {
  background: #f8fafc;
  opacity: .55;
  cursor: not-allowed;
}

/* ===== R37：图片预览 modal ===== */
.photo-viewer-overlay {
  align-items: center;
  justify-content: center;
}
.photo-viewer-box {
  background: #ffffff;
  border-radius: 12px;
  width: min(800px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
  animation: photo-viewer-in .2s ease-out;
}
@keyframes photo-viewer-in {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.photo-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #475569;
}
.photo-viewer-title {
  font-weight: 600;
  color: #1e293b;
}
.photo-viewer-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.photo-viewer-close:hover {
  color: #1e293b;
  background: #f1f5f9;
}
.photo-viewer-main {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: 65vh;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}
.photo-viewer-bigimg {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
  display: block;
}
.photo-viewer-empty {
  color: #94a3b8;
  font-size: 14px;
  padding: 40px 20px;
}
.photo-viewer-thumbs {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  justify-content: center;
  flex-wrap: wrap;
}
.photo-viewer-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
  min-width: 76px;
}
.photo-viewer-thumb:not(:disabled):hover {
  background: #f8fafc;
  transform: translateY(-2px);
}
.photo-viewer-thumb.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
}
.photo-viewer-thumb img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.photo-viewer-thumb-empty {
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  padding: 2px;
}
.photo-viewer-thumb-name {
  font-size: 12px;
  color: #475569;
}
.photo-viewer-thumb:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.photo-viewer-thumb:disabled .photo-viewer-thumb-empty {
  background: #f1f5f9;
}

/* 审核 badge（彩色 chip，可点击） */
.realname-table .audit-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: filter .15s;
}
.realname-table .audit-badge:hover { filter: brightness(0.95); }
.audit-pending  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.audit-approved { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.audit-rejected { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.audit-expired  { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }

/* R28 · 行内"通过 / 驳回"快速按钮（待审核行专属）
   设计目标：紧凑、彩色、不抢戏、不破坏表头节奏 */
.realname-table .audit-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: center;
}
.realname-table .audit-inline .audit-badge { cursor: default; }  /* 行内模式下 badge 不再触发弹窗 */
.realname-table .audit-btn {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: #fff;
  white-space: nowrap;
  line-height: 1.4;
  transition: background .15s, filter .15s, opacity .15s;
  font-family: inherit;
}
.realname-table .audit-btn.audit-approve {
  color: #15803d; border-color: #bbf7d0;
}
.realname-table .audit-btn.audit-approve:hover { background: #f0fdf4; }
.realname-table .audit-btn.audit-reject {
  color: #b91c1c; border-color: #fecaca;
}
.realname-table .audit-btn.audit-reject:hover  { background: #fef2f2; }
.realname-table .audit-btn:active              { filter: brightness(0.96); }
.realname-table .audit-btn:disabled            { opacity: .55; cursor: not-allowed; }

/* R151 · 「一键通过」列。R28 inline 按钮移到独立列后,样式更显眼 */
.realname-table .oneclick-cell { white-space: nowrap; }
.realname-table .oneclick-actions {
  display: inline-flex; gap: 4px; justify-content: center; align-items: center;
}
.realname-table .oneclick-btn {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
  line-height: 1.4;
  font-family: inherit;
  border: 1px solid;
  transition: background .15s, filter .15s, opacity .15s;
}
.realname-table .oneclick-btn.oneclick-approve {
  color: #fff; background: #10b981; border-color: #059669;
}
.realname-table .oneclick-btn.oneclick-approve:hover { background: #059669; }
.realname-table .oneclick-btn.oneclick-reject {
  color: #fff; background: #ef4444; border-color: #dc2626;
}
.realname-table .oneclick-btn.oneclick-reject:hover { background: #dc2626; }
.realname-table .oneclick-btn:active               { filter: brightness(0.94); }
.realname-table .oneclick-btn:disabled             { opacity: .55; cursor: not-allowed; }
.realname-table .oneclick-dash { color: #cbd5e1; font-size: 13px; }

/* R28 · Toast（行内按钮反馈：成功 / 失败） */
.realname-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 9999;
  animation: realname-toast-in .2s ease-out;
}
/* ---- R173 · 授权操作双按钮 ---- */
.license-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

/* ---- R173 · 授权书预览弹窗(基于 .modal-overlay flex 居中,内层 box 用新类名避免与 R163 .modal 冲突)---- */
.modal.modal-license {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  /* ★ R260-c 修复：.modal 基类的 align-items:center 在 flex column 下会让 header/body/footer
     按【内容宽度】收缩 ⇒ body 收缩到 iframe 默认宽 300px ⇒ 授权书 800px 内容在 300px 视口里
     横向滚动、左侧被裁（用户截图：甲方卡片/套餐列名被切）⇒ 显式 stretch 恢复铺满。 */
  align-items: stretch;
  width: min(880px, 96vw);
  height: min(820px, 92vh);
  max-height: 92vh;
  background: #fff;
  border-radius: 12px;
  border-top: 4px solid #2563eb;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
  overflow: hidden;                /* iframe 自有滚动,外层不滚动 */
}
.license-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-shrink: 0;
}
.license-modal-title strong { color: #111827; font-size: 16px; }
.license-modal-title .muted { color: #6b7280; font-size: 13px; margin-left: 6px; }
.license-modal-actions {
  display: inline-flex;
  gap: 6px;
}
.license-modal-body {
  flex: 1;
  position: relative;
  background: #f3f4f6;
  min-height: 0;                  /* flex 子项 min-height 默认 auto,设 0 才能滚动 */
}
.license-modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.license-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  background: #fff;
}
.license-modal-error {
  color: #cf1322;
  background: #fff1f0;
}
.license-modal-footer {
  padding: 8px 18px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
}
.license-modal-footer code {
  background: #eef2ff;
  color: #4338ca;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
}

.realname-toast-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.realname-toast-error   { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
@keyframes realname-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.realname-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* R154：一键批量通过审核 banner — 只在 pending > 0 时显式提示 */
.realname-batch-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  padding: 12px 18px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 6px;
}
/* R170 · 修:display: flex 会覆盖 HTML hidden 属性,显式 [hidden] 置回 none */
.realname-batch-banner[hidden],
.realname-stats[hidden] { display: none !important; }
.realname-batch-banner-text {
  flex: 1;
  color: #d46b08;
  font-size: 13px;
  font-weight: 500;
}
.realname-batch-banner-btn {
  flex-shrink: 0;
  height: 30px;
  padding: 0 16px;
  background: #fa8c16;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.realname-batch-banner-btn:hover:not(:disabled) { background: #d46b08; }
.realname-batch-banner-btn:disabled { background: #d9d9d9; color: #fff; cursor: not-allowed; }

/* 审核弹窗复用 .modal-overlay / .modal-box，再加专属元数据 */
.audit-meta {
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}
.audit-meta strong { color: var(--text-dim); font-weight: 500; margin-right: 2px; }

.modal-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.modal-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 102, .15);
}

/* ===================================================================
   realkyc · 项目与人员 → 实名与证件（钉钉风录入表单）
   =================================================================== */
.realkyc-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
  margin: 0 0 18px;             /* 紧贴 main 左对齐，不强行居中（与 .proj-section 等一致） */
  position: relative;
}

/* 顶部 brand */
.realkyc-brand {
  text-align: center;
  padding: 12px 0 18px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 22px;
}
.realkyc-brand-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.rk-h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1px;
}
.rk-sub {
  font-size: 12px;
  color: var(--text-dim);
}
.rk-h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.realkyc-brand-cert {
  font-size: 12px;
  color: var(--primary);
  background: rgba(14, 124, 102, .06);
  padding: 4px 14px;
  border-radius: 14px;
  display: inline-block;
}

/* 表单网格 */
.realkyc-form {
  position: relative;
}
.realkyc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 22px;
}
/* ★★ R246 · grid item 默认 `min-width:auto` ⇒ 内容（长占位文案/下拉箭头）会把列撑破
   ⇒ 窄屏时右侧列（银行卡号 / 行号）被裁掉一截。
   修法：列宽可收缩（min-width:0）+ 控件自身不撑破。 */
.realkyc-grid > * { min-width: 0; }
.realkyc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.realkyc-col-2 {
  grid-column: span 2;
}
.realkyc-label {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 2px;
}
.realkyc-required {
  color: #e54d42;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.realkyc-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.realkyc-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 102, .15);
}
.realkyc-input::placeholder {
  color: #b8bcc7;
  font-size: 13px;
}
.realkyc-mono {
  font-family: 'SF Mono', Consolas, 'Liberation Mono', monospace;
  letter-spacing: 0.3px;
}

/* R30 · 项目 / 班组 下拉菜单 */
.realkyc-select {
  width: 100%;
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>")
    no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.realkyc-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 102, .15);
}
.realkyc-select:disabled {
  background-color: #f5f7fa;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: .8;
}
.realkyc-select.realkyc-bad {
  border-color: #e54d42;
  box-shadow: 0 0 0 3px rgba(229, 77, 66, .12);
}

.realkyc-field-error .realkyc-input {
  border-color: #e54d42;
  box-shadow: 0 0 0 3px rgba(229, 77, 66, .12);
}
.realkyc-msg {
  font-size: 12px;
  color: #e54d42;
  margin-top: 2px;
}

/* R76：薪资标准（双模式：日薪 / 月薪）独立段 */
.realkyc-salary {
  margin: 22px 32px 12px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #f6fbff 0%, #f0f7ff 100%);
  border: 1px solid #d6e4ff;
  border-radius: 8px;
}
.realkyc-salary-head {
  display: block;
  margin-bottom: 12px;
  color: #1d39c4;
  font-weight: 600;
}
.realkyc-salary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
  align-items: end;
}
.realkyc-salary-hint {
  align-self: end;
  font-size: 12px;
  color: #595959;
  padding-bottom: 8px;
}
.realkyc-salary-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.realkyc-salary-inline .realkyc-select {
  width: auto;
  min-width: 130px;
}
.realkyc-salary-inline .realkyc-input {
  flex: 1;
}
.realkyc-salary-inline-unit {
  font-size: 13px;
  color: #595959;
  white-space: nowrap;
}
.realkyc-salary-amount .realkyc-input {
  /* 数字 input 移除原生上下箭头（chrome/safari）*/
  -moz-appearance: textfield;
  appearance: textfield;
}
.realkyc-salary-amount .realkyc-input::-webkit-outer-spin-button,
.realkyc-salary-amount .realkyc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 上传区 */
.realkyc-uploads {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 20px;
}
.realkyc-uploads-group {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 16px;
}
.realkyc-uploads-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.realkyc-uploads-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 4px;
}
.realkyc-uploads-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.realkyc-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 12px;
  border: 1.5px dashed #cdd3dd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.realkyc-upload:hover {
  border-color: var(--primary);
  background: rgba(14, 124, 102, .03);
}
.realkyc-upload.has-file {
  border-style: solid;
  border-color: var(--primary);
  background: rgba(14, 124, 102, .04);
}
.realkyc-upload-error {
  border-color: #e54d42 !important;
}
.realkyc-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.realkyc-upload-frame {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #f1f4f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: hidden;
}
.realkyc-upload.has-file .realkyc-upload-frame {
  background: transparent;
}
.realkyc-upload-label {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 2px;
}
.realkyc-upload-hint {
  font-size: 11px;
  color: var(--text-dim);
}

/* 操作行 */
.realkyc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  padding-top: 16px;
}
.realkyc-btn-primary {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 9px 22px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, opacity .15s;
}
.realkyc-btn-primary:hover:not(:disabled) { background: var(--primary-2); }
.realkyc-btn-primary:disabled,
.realkyc-btn-primary.loading {
  opacity: 0.65;
  cursor: not-allowed;
}
.realkyc-btn-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  border-radius: 50%;
  font-size: 11px;
}
.realkyc-btn-sub {
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,.4);
  font-weight: 400;
  font-size: 13px;
}
.realkyc-btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.realkyc-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.realkyc-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* Badge */
.realkyc-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.realkyc-badge-pending  { background: #fff7e6; color: #d48806; border: 1px solid #ffe7ba; }
.realkyc-badge-approved { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.realkyc-badge-rejected { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.realkyc-badge-expired  { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }

/* Toast */
.realkyc-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 9999;
  animation: realkyc-toast-in .2s ease-out;
}
.realkyc-toast-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.realkyc-toast-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
/* R34：多行错误（413 body too large 等）：拓宽到 480px、文字左对齐、行高舒适 */
.realkyc-toast.realkyc-toast-multiline {
  min-width: 320px;
  max-width: 480px;
  white-space: normal;
  text-align: left;
  line-height: 1.55;
  padding: 12px 16px;
}
@keyframes realkyc-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============== v=15 · 实名与证件 Tab 切换器 ============== */
.realkyc-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  margin: 8px 0 0;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.realkyc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;     /* 让下划线跟底边线对齐 */
  transition: color .15s, border-color .15s;
  user-select: none;
}
.realkyc-tab:hover {
  color: #0e7c66;
  background: #f9fafb;
}
.realkyc-tab.active {
  color: #0e7c66;
  border-bottom-color: #0e7c66;
  font-weight: 600;
}
.realkyc-tab-icon {
  font-size: 15px;
  line-height: 1;
}

/* ===================================================================
   dispatch · 运营管理 → 工作布置（钉钉风表单 + 双 textarea + 红色发布按钮）
   =================================================================== */
.dispatch-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
  margin: 0 0 18px;
  position: relative;
}
/* R121 · 工作布置 · 筛选工具条 */
.dispatch-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; padding: 14px 16px; background: #fafbfc; border: 1px solid var(--border); border-radius: 10px; }
.dispatch-pick { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.dispatch-pick .lbl { font-size: 12px; color: var(--text-dim, #6b7280); }
.dispatch-pick-grow { flex: 1; min-width: 200px; }
.dispatch-toolbar .dispatch-select, .dispatch-toolbar .dispatch-input { height: 32px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 13px; color: var(--text); }
.dispatch-toolbar .dispatch-select:focus, .dispatch-toolbar .dispatch-input:focus { outline: none; border-color: var(--primary); }

/* R125 ~ R128 · 运营组共享筛选工具条（realkyc / hiring / attendance） */
.ops-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; padding: 14px 16px; background: #fafbfc; border: 1px solid var(--border); border-radius: 10px; }
.ops-pick { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.ops-pick .lbl { font-size: 12px; color: var(--text-dim, #6b7280); }
.ops-pick-grow { flex: 1; min-width: 200px; }
.ops-toolbar .ops-select, .ops-toolbar .ops-input { height: 32px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 13px; color: var(--text); }
.ops-toolbar .ops-select:focus, .ops-toolbar .ops-input:focus { outline: none; border-color: var(--primary); }
.ops-toolbar .ops-select { padding-right: 24px; }
.ops-toolbar .ops-clear-btn { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text-dim); font-size: 12px; cursor: pointer; }
.ops-toolbar .ops-clear-btn:hover { background: #f3f4f6; }

.dispatch-brand {
  text-align: center;
  padding: 12px 0 18px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 22px;
}
.dispatch-brand-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.dispatch-brand-cert {
  font-size: 12px;
  color: var(--primary);
  background: rgba(14, 124, 102, .06);
  padding: 4px 14px;
  border-radius: 14px;
  display: inline-block;
}

.dispatch-form {
  position: relative;
}

.dispatch-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 18px;
}

.dispatch-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.dispatch-row2 .dispatch-field { margin-bottom: 0; }

.dispatch-label {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.dispatch-required {
  color: #e54d42;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.dispatch-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 4px;
}

.dispatch-input,
.dispatch-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.dispatch-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.dispatch-input:focus,
.dispatch-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 102, .15);
}
.dispatch-input[readonly] {
  background: #f5f7fa;
  color: var(--text-dim);
  cursor: default;
}

.dispatch-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.dispatch-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 102, .15);
}
.dispatch-counter {
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
  margin-top: 4px;
}

.dispatch-field-error .dispatch-textarea,
.dispatch-field-error .dispatch-input,
.dispatch-field-error .dispatch-select {
  border-color: #e54d42;
  box-shadow: 0 0 0 3px rgba(229, 77, 66, .12);
}
.dispatch-msg {
  font-size: 12px;
  color: #e54d42;
  margin-top: 2px;
}

.dispatch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
}
.dispatch-btn-danger {
  background: #e54d42;
  color: #fff;
  border: 0;
  padding: 9px 22px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, opacity .15s;
}
.dispatch-btn-danger:hover:not(:disabled) { background: #cf1322; }
.dispatch-btn-danger:disabled,
.dispatch-btn-danger.loading {
  opacity: 0.65;
  cursor: not-allowed;
}
.dispatch-btn-sub {
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,.5);
  font-weight: 400;
  font-size: 13px;
}
.dispatch-btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.dispatch-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* 历史列表 */
.dispatch-recent {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.dispatch-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dispatch-recent-hint {
  font-size: 12px;
  color: var(--text-dim);
}
.dispatch-recent-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.dispatch-recent-table th,
.dispatch-recent-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dispatch-recent-table th {
  background: #f5f7fa;
  font-weight: 500;
  color: var(--text-dim);
}
/* R294 · 工作内容/技术交底列：宽度固定、高度随内容自适应（换行展开） */
.dispatch-recent-table td.dispatch-td-wrap {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-all;
  overflow-wrap: anywhere;
  vertical-align: top;
  line-height: 1.6;
}
.dispatch-mono {
  font-family: 'SF Mono', Consolas, 'Liberation Mono', monospace;
  letter-spacing: 0.3px;
  color: var(--text);
}
.dispatch-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.dispatch-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.dispatch-badge-draft     { background: #f5f5f5; color: #595959; border: 1px solid #d9d9d9; }
.dispatch-badge-published { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

.dispatch-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 9999;
  animation: dispatch-toast-in .2s ease-out;
}
.dispatch-toast-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.dispatch-toast-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
@keyframes dispatch-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =====================================================================
 * v=17 · 招工发布（运营管理 → 招工发布）
 *   钉钉风：红字 label / 2 列栅格 / 工种 optgroup / 薪资组合输入 / 红发布按钮
 * ===================================================================== */

.hiring-section {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 0;
  margin: 0 0 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.hiring-brand {
  padding: 28px 24px 16px;
  border-bottom: 1px dashed #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hiring-brand-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.hiring-brand-title .rk-h1 { font-size: 22px; font-weight: 600; color: #1d2129; }
.hiring-brand-title .rk-sub { font-size: 13px; color: #8c8c8c; }
.hiring-brand-cert {
  font-size: 12px;
  color: #8c8c8c;
  background: #fafafa;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
}

.hiring-form { padding: 24px; }
.hiring-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.hiring-row1 { margin-bottom: 16px; }
.hiring-field { display: flex; flex-direction: column; gap: 6px; }
.hiring-row2 .hiring-field { margin-bottom: 0; }

.hiring-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  color: #1d2129;
  flex-wrap: wrap;
}
.hiring-required {
  color: #cf1322;
  font-weight: 600;
  font-size: 14px;
}
.hiring-hint {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: normal;
}

.hiring-input,
.hiring-select {
  height: 36px;
  padding: 4px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  color: #1d2129;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}
.hiring-input:focus,
.hiring-select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}
.hiring-input[readonly] {
  background: #fafafa;
  color: #595959;
  cursor: not-allowed;
}
.hiring-select {
  cursor: pointer;
}

.hiring-salary {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  gap: 8px;
  align-items: center;
}
.hiring-salary-amount { width: 100%; }
.hiring-salary-unit {
  font-size: 13px;
  color: #595959;
  padding-left: 4px;
}

.hiring-radio { display: inline-flex; gap: 18px; padding: 4px 0; }
.hiring-radio-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #1d2129;
  cursor: pointer;
}
.hiring-radio-item input[type="radio"] { accent-color: #1677ff; cursor: pointer; }

.hiring-textarea {
  width: 100%;
  min-height: 120px;            /* ≈ 5 行 × 24px line-height */
  padding: 8px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
  color: #1d2129;
  outline: none;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.hiring-textarea:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}

.hiring-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.hiring-btn-secondary,
.hiring-btn-danger {
  height: 38px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .2s, transform .1s;
}
.hiring-btn-secondary {
  background: #fff;
  border-color: #d9d9d9;
  color: #1d2129;
}
.hiring-btn-secondary:hover { border-color: #1677ff; color: #1677ff; }
.hiring-btn-danger {
  background: #cf1322;
  color: #fff;
  border-color: #cf1322;
}
.hiring-btn-danger:hover { background: #e63946; }
.hiring-btn-danger:active { transform: translateY(1px); }
.hiring-btn-danger:disabled,
.hiring-btn-secondary:disabled { opacity: .5; cursor: not-allowed; }
.hiring-btn-danger.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hiring-spin .8s linear infinite;
}
.hiring-btn-sub { font-size: 12px; opacity: .9; }
@keyframes hiring-spin { to { transform: rotate(360deg); } }

.hiring-field-error .hiring-input,
.hiring-field-error .hiring-select,
.hiring-field-error .hiring-textarea {
  border-color: #cf1322;
  box-shadow: 0 0 0 2px rgba(207,19,34,.08);
}
.hiring-msg {
  color: #cf1322;
  font-size: 12px;
  margin-top: 2px;
}

.hiring-recent {
  border-top: 1px solid #f0f0f0;
  padding: 20px 24px 24px;
}
.hiring-recent-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  justify-content: space-between;
}
.hiring-recent-head .rk-h2 { font-size: 16px; font-weight: 600; color: #1d2129; }
.hiring-recent-hint { font-size: 12px; color: #8c8c8c; }
.hiring-recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hiring-recent-table th,
.hiring-recent-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 10px;
  text-align: left;
  color: #1d2129;
  vertical-align: middle;
}
.hiring-recent-table th {
  background: #fafafa;
  font-weight: 500;
  color: #595959;
}
.hiring-recent-table tr:hover td { background: #fafafa; }
.hiring-num { font-variant-numeric: tabular-nums; }
.hiring-mono { font-family: 'Menlo','Monaco','Consolas',monospace; font-size: 12px; color: #595959; }
.hiring-unit { font-size: 11px; color: #8c8c8c; margin-left: 2px; }

.hiring-cert-yes {
  display: inline-block;
  padding: 1px 8px;
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
  border-radius: 10px;
  font-size: 12px;
}
.hiring-cert-no {
  display: inline-block;
  padding: 1px 8px;
  background: #f5f5f5;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-size: 12px;
}

.hiring-btn-close {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #cf1322;
  height: 26px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}
.hiring-btn-close:hover { background: #fff1f0; border-color: #ffa39e; }

/* R148 · 编辑按钮(蓝色,白底,小尺寸) */
.hiring-btn-edit {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #1677ff;
  height: 26px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
}
.hiring-btn-edit:hover { background: #e6f4ff; border-color: #69b1ff; }

/* R148 · 编辑模式顶部 banner(琥珀色) */
.hiring-edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #874d00;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}
.hiring-edit-bd-msg code {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  color: #874d00;
}
.hiring-edit-bd-tag {
  background: #fa8c16;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
.hiring-edit-banner .hiring-btn-secondary {
  height: 30px;
  font-size: 12px;
  padding: 0 12px;
}

.hiring-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.hiring-badge-draft     { background: #f5f5f5; color: #8c8c8c; border: 1px solid #d9d9d9; }
.hiring-badge-published { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.hiring-badge-closed    { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

.hiring-empty {
  text-align: center;
  color: #bfbfbf;
  padding: 24px 0;
  font-size: 13px;
}

.hiring-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 9999;
  animation: hiring-toast-in .2s ease-out;
}
.hiring-toast-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.hiring-toast-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
@keyframes hiring-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =====================================================================
 * v=18 · 考勤管理（运营管理 → 考勤管理）
 *   钉钉风：顶部 4 列顶区 / 20 行占位表 / 个人月度日历
 * ===================================================================== */

.attendance-section {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 0;
  margin: 0 0 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

/* =====================================================================
 * R195 · 考勤时段规则说明条
 * ===================================================================== */
.attendance-shift-rule {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 18px;
  font-size: 13px;
  color: #78350f;
}
.attendance-shift-rule .asr-ico { font-size: 14px; }
.attendance-shift-rule .asr-title { font-weight: 700; color: #92400e; }
.attendance-shift-rule .asr-sep { color: #fcd34d; }
.attendance-shift-rule .asr-item b { color: #92400e; }
.attendance-shift-rule .asr-item {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  padding: 2px 8px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #fde68a;
}
.attendance-shift-rule .asr-note {
  margin-left: auto;
  color: #b45309;
  font-size: 12px;
}

/* 顶部 4 列顶区 */
.attendance-top {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;   /* R42: 移除"发布定位"后改为 3 列 */
  gap: 0;
  border-bottom: 1px dashed #f0f0f0;
}
.attendance-top-cell {
  padding: 18px 18px 16px;
  border-right: 1px dashed #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 90px;
  justify-content: flex-start;
}
.attendance-top-cell:last-child { border-right: none; }
.attendance-top-cell.is-center { text-align: center; align-items: center; }
.attendance-top-title {
  font-size: 18px;
  font-weight: 500;
  color: #cf1322;                /* 红色 label */
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.attendance-top-title .rk-sub {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: normal;
}
.attendance-top-title.attendance-top-publish { font-size: 20px; }
.attendance-top-cert {
  font-size: 11px;
  color: #8c8c8c;
  background: #fafafa;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
}
.attendance-top-hint {
  font-size: 12px;
  color: #8c8c8c;
}

/* R47 顶区"项目"cell 加双下拉（项目 + 班组） */
.attendance-top-cell-stack .attendance-top-title {
  margin-bottom: 4px;
}
.attendance-top-title-team {
  margin-top: 12px;        /* 班组 label 与项目下拉间距 */
  font-size: 16px;          /* 班组 label 比主项目略小，避免视觉冗余 */
}
.attendance-top-select {
  width: 100%;
  height: 32px;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #262626;
  cursor: pointer;
}
.attendance-top-select:disabled {
  background: #fafafa;
  color: #bfbfbf;
  cursor: not-allowed;
}
.attendance-top-cell-stack #attendance-top-team-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #389e0d;            /* 绿字提示定位范围 */
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  padding: 4px 8px;
  border-radius: 3px;
}

/* R48 真实打卡按钮（工头本人打卡） */
.attendance-checkin-btns {
  display: flex;
  gap: 12px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.attendance-checkin-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 92px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  background: #fafafa;
  color: #595959;
  cursor: not-allowed;
  transition: all .15s;
  user-select: none;
}
.attendance-checkin-btn:disabled {
  opacity: .55;
}
.attendance-checkin-btn:not(:disabled) {
  cursor: pointer;
  background: #fff;
  border-color: #1677ff;
  color: #1677ff;
  box-shadow: 0 1px 2px rgba(22, 119, 255, .12);
}
.attendance-checkin-btn:not(:disabled):hover {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
}
.attendance-checkin-btn.is-on {
  background: #e6f4ff;
  border-color: #1677ff;
  color: #1677ff;
  font-weight: 500;
}
.attendance-checkin-btn-label {
  font-size: 13px;
  font-weight: 500;
}
.attendance-checkin-btn-time {
  font-size: 11px;
  color: #8c8c8c;
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.attendance-checkin-btn:not(:disabled) .attendance-checkin-btn-time {
  color: #69b1ff;
}
.attendance-checkin-btn-out:not(:disabled) {
  border-color: #fa8c16;
  color: #fa8c16;
}
.attendance-checkin-btn-out:not(:disabled):hover {
  background: #fa8c16;
  border-color: #fa8c16;
}
.attendance-checkin-btn-ot:not(:disabled) {
  border-color: #722ed1;
  color: #722ed1;
}
.attendance-checkin-btn-ot:not(:disabled):hover {
  background: #722ed1;
  border-color: #722ed1;
}
/* R49 "电脑办公员工"副标放按钮下方并居中 */
.attendance-checkin-sub {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 10px;
  text-align: center;
  width: 100%;
}
/* R50 定位拾取 cell */
.attendance-locate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
}
.attendance-locate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  color: #1677ff;
  background: #fff;
  border: 1px solid #91caff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.attendance-locate-btn:hover { background: #e6f4ff; border-color: #1677ff; }
.attendance-locate-btn:disabled {
  cursor: wait;
  color: #8c8c8c;
  border-color: #d9d9d9;
  background: #fafafa;
}
.attendance-locate-btn.is-ok {
  color: #389e0d;
  border-color: #b7eb8f;
  background: #f6ffed;
}
.attendance-locate-result {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
}
.attendance-locate-result[hidden] { display: none; }
.locate-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.locate-row:last-child { border-bottom: 0; }
.locate-k { color: #8c8c8c; }
.locate-val { color: #1d2129; font-weight: 500; }
.locate-val.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.attendance-locate-msg {
  font-size: 12px;
  min-height: 16px;
  text-align: center;
}
.attendance-locate-msg.is-err { color: #cf1322; }
.attendance-locate-msg.is-ok  { color: #389e0d; }

/* ----- Layout: 考勤定位拾取（projects / R63） ----- */
.locate-block {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #d9d9d9;
  border-radius: 8px;
  background: #fafafa;
}
.locate-block-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d2129;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.locate-block-sub {
  font-size: 12px;
  font-weight: 400;
  color: #8c8c8c;
}
.locate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  color: #1d2129;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.locate-btn:hover {
  background: #e6f4ff;
  border-color: #1677ff;
  color: #1677ff;
}
.locate-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.locate-btn.is-ok {
  background: #f6ffed;
  border-color: #52c41a;
  color: #389e0d;
}
.locate-result {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
}
.locate-result[hidden] { display: none; }
.locate-msg {
  margin-top: 6px;
  font-size: 12px;
  min-height: 16px;
}
.locate-msg.is-err { color: #cf1322; }
.locate-msg.is-ok  { color: #389e0d; }
.attendance-checkin-status {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 4px;
}
.attendance-checkin-status.is-empty { color: #bfbfbf; }
.attendance-checkin-status.is-ok    { color: #389e0d; font-weight: 500; }
.attendance-checkin-msg {
  font-size: 12px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 3px;
}
.attendance-checkin-msg[hidden] { display: none; }
.attendance-checkin-msg-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.attendance-checkin-msg-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* 第二段：项目下拉 + 表格 */
.attendance-table-wrap { padding: 24px; }
.attendance-table-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.attendance-table-title {
  font-size: 16px;
  color: #cf1322;
  font-weight: 500;
}
.attendance-table-hint {
  font-size: 12px;
  color: #8c8c8c;
}
.attendance-select {
  height: 32px;
  padding: 4px 28px 4px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  color: #1d2129;
  outline: none;
  cursor: pointer;
  min-width: 200px;
}
.attendance-select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}
.attendance-date-label {
  margin-left: auto;
  font-size: 13px;
  color: #595959;
}
.attendance-date-label span { color: #1d2129; font-weight: 500; }

/* 5 列表格（20 行） */
.attendance-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.attendance-table th,
.attendance-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 10px;
  text-align: left;
  color: #1d2129;
  vertical-align: middle;
  word-break: break-all;
}
.attendance-table th {
  background: #fafafa;
  font-weight: 500;
  color: #595959;
  border-bottom: 1px solid #d9d9d9;
}
.attendance-row { height: 38px; }
.attendance-placeholder td { color: #bfbfbf; }
.attendance-cell-name { font-weight: 500; }
/* R228：全显模式「所属项目」列 —— 长项目名单行省略，完整名走 title */
.attendance-cell-project {
  font-size: 12px;
  color: #595959;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

/* =====================================================================
   ★ R229 · 考勤管理页重排 + 考勤详情弹窗
   ---------------------------------------------------------------------
   1) 第一栏：项目筛选条（项目下拉 + 当前日期）
   2) 第二栏：KPI（沿用 .kpi-row / .kpi-card）
   3) 第三栏：搜索（沿用 .ops-toolbar）
   4) 「考勤详细」由页面底部卡片改为 .modal-overlay 弹窗
   ===================================================================== */
.attendance-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 0 0 14px;
  padding: 12px 16px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.attendance-filter-bar .ops-pick { min-width: 220px; }
.attendance-filter-bar .attendance-select {
  height: 32px;
  padding: 4px 24px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
.attendance-filter-bar .attendance-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* R230 · KPI 改为「分拣按钮」—— 前 3 张卡可点击筛选下方列表 */
.kpi-filter-btn {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.kpi-filter-btn:hover {
  border-color: var(--primary);
  background: #f7f9ff;
}
.kpi-filter-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.kpi-filter-btn.is-active {
  border-color: var(--primary);
  background: #eef3ff;
  box-shadow: 0 0 0 1px var(--primary) inset;
}
.kpi-filter-btn.is-active .kpi-label { color: var(--primary); font-weight: 600; }
.kpi-filter-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 400;
  line-height: 15px;
  vertical-align: 1px;
}
.kpi-static-card { cursor: default; }

/* R230 · 未通过实名审核的工人标识 + 不可补勤占位 */
.attendance-unverified-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid #ffd591;
  border-radius: 4px;
  background: #fff7e6;
  color: #d46b08;
  font-size: 11px;
  line-height: 16px;
  vertical-align: 1px;
  cursor: help;
}
.attendance-makeup-disabled {
  display: inline-block;
  color: #bfbfbf;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  cursor: help;
}

/* 考勤详情弹窗（点姓名弹出） */
.modal-box.modal-box-wide.attendance-detail-modal-box {
  width: 1600px;
  max-width: 97vw;
  max-height: 92vh;
  overflow-y: auto;
  padding: 0;
}
.attendance-detail-modal-box .modal-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.attendance-detail-modal-sub {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: #8c8c8c;
}
.attendance-detail-modal-box .modal-body { padding: 14px 18px 18px; }
.attendance-detail-modal-box .attendance-detail-controls {
  margin-bottom: 10px;
}
.attendance-detail-modal-box .attendance-detail-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d2129;
}
/* ★ 补勤弹窗必须盖在「考勤详情」弹窗之上（两者都是 z-index:1000） */
.makeup-modal-mask { z-index: 1200; }
.attendance-worker-link {
  color: #1677ff;
  text-decoration: none;
  cursor: pointer;
}
.attendance-worker-link:hover { text-decoration: underline; color: #4096ff; }
.attendance-check {
  display: inline-block;
  margin-left: 6px;
  font-family: 'Menlo','Monaco','Consolas',monospace;
  font-size: 11px;
  color: #8c8c8c;
}
/* R79：出勤列主行（badge + 时间段），二级行"出勤 N 天" */
.attendance-att-main {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 22px;
}
.attendance-out-days {
  margin-top: 2px;
  font-size: 11px;
  color: #595959;
  letter-spacing: 0.5px;
}
.attendance-out-days:empty { display: none; }
/* R84：待审天数提示 — 黄底橙字,让用户一眼看出"还有 N 天没审" */
.attendance-out-days .attendance-pending-hint {
  color: #d46b08;
  background: #fff7e6;
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 2px;
  font-weight: 600;
}
/* R85：一键通过按钮 — 小蓝按钮,与"待审"并列 */
.attendance-out-days .attendance-batch-approve {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  background: #1677ff;
  color: #fff;
  font-size: 10px;
  line-height: 18px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.attendance-out-days .attendance-batch-approve:hover { background: #4096ff; }
/* R86：补勤审核列的一键通过(整行醒目标注,直接显示在第 5 列) */
.attendance-batch-approve-cell {
  display: inline-block;
  padding: 2px 8px;
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.attendance-batch-approve-cell:hover {
  background: #ffe7ba;
  color: #ad4e00;
}
.attendance-table-hint {
  text-align: center;
  color: #8c8c8c;
  font-size: 13px;
  padding: 16px 0 4px;
}
.attendance-table-hint b { color: #1677ff; }

/* R87：顶部批量 banner — 在任意待审补勤存在时显式提示 */
.attendance-batch-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 12px;
  padding: 12px 18px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 6px;
}
.attendance-batch-banner-text {
  flex: 1;
  color: #d46b08;
  font-size: 13px;
  font-weight: 500;
}
.attendance-batch-banner-btn {
  flex-shrink: 0;
  height: 30px;
  padding: 0 16px;
  background: #fa8c16;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.attendance-batch-banner-btn:hover:not(:disabled) { background: #d46b08; }
.attendance-batch-banner-btn:disabled { background: #d9d9d9; color: #fff; cursor: not-allowed; }

/* R87：补勤审核列上下叠放(badge + 一键通过) */
.attendance-makeup-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  white-space: nowrap;
}
.attendance-makeup-batch-row .attendance-batch-approve {
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
}

/* 状态徽标 */
.attendance-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.6;
}
.attendance-badge-empty { background: transparent; color: #bfbfbf; }
.attendance-badge-normal   { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.attendance-badge-late     { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.attendance-badge-early    { background: #fff2e8; color: #d4380d; border: 1px solid #ffbb96; }
.attendance-badge-absent   { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.attendance-badge-overtime { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }
.attendance-makeup-pending  { background: #fafafa; color: #8c8c8c; border: 1px solid #d9d9d9; cursor: default; }
.attendance-makeup-approved { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.attendance-makeup-rejected { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* R152：补勤审核列上下叠放(badge + 一键通过) — 已下线
   - 行内 [一键通过 N 条] 链接已删除,改走顶部 banner 一键批量
   - 保留 .attendance-makeup-stack 样式为防御性(无 DOM 引用也无害)
   实际渲染现在只走单层 makeupBadge → 不再嵌套 .attendance-makeup-batch-row
*/
.attendance-makeup-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  white-space: nowrap;
}

/* 状态徽标 */
.attendance-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.6;
}
.attendance-badge-empty { background: transparent; color: #bfbfbf; }
.attendance-badge-normal   { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.attendance-badge-late     { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.attendance-badge-early    { background: #fff2e8; color: #d4380d; border: 1px solid #ffbb96; }
.attendance-badge-absent   { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.attendance-badge-overtime { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }
.attendance-makeup-pending  { background: #fafafa; color: #8c8c8c; border: 1px solid #d9d9d9; cursor: default; }
.attendance-makeup-approved { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.attendance-makeup-rejected { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* R75：行内 3 件套(badge + 通过 + 驳回) — R152 沿用 */
.attendance-makeup-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.attendance-makeup-btn {
  height: 22px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid;
  background: #fff;
  line-height: 1;
}
.attendance-makeup-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.attendance-makeup-approve {
  border-color: #389e0d;
  color: #389e0d;
}
.attendance-makeup-approve:hover:not(:disabled) {
  background: #f6ffed;
}
.attendance-makeup-reject {
  border-color: #cf1322;
  color: #cf1322;
}
.attendance-makeup-reject:hover:not(:disabled) {
  background: #fff1f0;
}

/* 个人考勤详细 */
.attendance-detail {
  border-top: 1px solid #f0f0f0;
  padding: 24px;
}
.attendance-detail-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.attendance-detail-head .rk-h2 { font-size: 16px; font-weight: 600; color: #1d2129; }
.attendance-detail-hint { font-size: 12px; color: #8c8c8c; }
.attendance-detail-month {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #cf1322;
  margin-bottom: 8px;
}
.attendance-detail-label .rk-required { font-weight: 600; }
.attendance-detail-dayhint {
  font-size: 12px;
  color: #8c8c8c;
}
.attendance-detail-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
/* =============== R68：考勤分页器 =============== */
.attendance-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 0;
  font-size: 13px;
  color: #4e5969;
}
.attendance-pagination-info {
  color: #86909c;
  font-size: 12px;
  margin-right: 4px;
}
.attendance-page-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #c9cdd4;
  border-radius: 4px;
  background: #fff;
  color: #1d2129;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.attendance-page-btn:hover:not(:disabled) {
  border-color: #1677ff;
  color: #1677ff;
}
.attendance-page-btn:disabled {
  color: #c9cdd4;
  background: #f7f8fa;
  cursor: not-allowed;
}
.attendance-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.attendance-page-num {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #1d2129;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.attendance-page-num:hover {
  border-color: #1677ff;
  color: #1677ff;
}
.attendance-page-num.is-active {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
  font-weight: 500;
  cursor: default;
}
.attendance-page-ellipsis {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #86909c;
  font-size: 12px;
  user-select: none;
}

.attendance-detail-name {
  font-size: 14px;
  font-weight: 500;
  color: #1677ff;
}
.attendance-month-select { min-width: 140px; }
.attendance-btn-secondary {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #595959;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}
.attendance-btn-secondary:hover { border-color: #1677ff; color: #1677ff; }

/* 月度日历表 */
.attendance-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.attendance-detail-table th,
.attendance-detail-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 10px;
  text-align: left;
  color: #1d2129;
  vertical-align: top;
  word-break: break-all;
}
.attendance-detail-table th {
  background: #fafafa;
  font-weight: 500;
  color: #595959;
  border-bottom: 1px solid #d9d9d9;
}
.attendance-mono { font-family: 'Menlo','Monaco','Consolas',monospace; font-size: 12px; color: #595959; }

/* =============== R72：补勤列 + 弹窗 =============== */
.attendance-cell-makeup {
  background: #fafbfc;
  text-align: center;
  padding: 0 6px;
}
.attendance-btn-makeup {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid #1677ff;
  background: #fff;
  color: #1677ff;
  border-radius: 4px;
  cursor: pointer;
}
.attendance-btn-makeup:hover { background: #e6f4ff; }

/* 补勤弹窗专属 mask：attendance.js 的补勤 modal 用 .makeup-modal-mask 作最外层
   （区别于 projects.js 的 .modal > .modal-mask + .modal-box 兄弟结构）；
   这里走 fixed 全屏 + flex 居中，让内部的 .modal-box 自动居中。
   见 attendance.js 第 ~122 行 R72 补勤 modal 的 DOM 结构注释。 */
.makeup-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.makeup-modal-mask[hidden] { display: none; }

/* 补勤弹窗专属 modal-box 样式（R72）—— 与 projects.js 的 .modal-box（圆角 12 / 460px / padding 22 24）样式不同 */
.makeup-modal-box {
  background: #fff;
  border-radius: 8px;
  min-width: 520px;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.modal-title { font-size: 15px; font-weight: 600; color: #1d2129; }
.modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #86909c;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: #1d2129; }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
}
.attendance-btn-primary {
  height: 32px;
  padding: 0 16px;
  background: #1677ff;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.attendance-btn-primary:hover { background: #4096ff; }
.attendance-btn-primary:disabled { background: #a5c8ff; cursor: not-allowed; }

.makeup-modal-box { width: 600px; }
.makeup-summary {
  display: flex;
  gap: 18px;
  padding: 8px 12px;
  background: #f5f7fa;
  border-radius: 4px;
  font-size: 12px;
  color: #4e5969;
  margin-bottom: 12px;
}
.makeup-summary b { color: #1d2129; margin-left: 4px; }
.makeup-section-title {
  font-size: 12px;
  color: #4e5969;
  font-weight: 500;
  margin: 12px 0 8px;
}
.makeup-daylist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
  max-height: 200px;
  overflow: auto;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  padding: 8px 10px;
}
.makeup-daylist-head,
.makeup-daylist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1d2129;
  cursor: pointer;
  padding: 2px 0;
}
.makeup-daylist-head { grid-column: 1 / -1; color: #1677ff; font-weight: 500; }
.makeup-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 14px;
}
.makeup-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #4e5969;
}
.makeup-form label > span { min-width: 56px; }
.makeup-form input {
  flex: 1;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
}
.makeup-form input:focus { border-color: #1677ff; outline: 0; }
.makeup-form-full { grid-column: 1 / -1; }
.makeup-hint {
  margin-top: 12px;
  padding: 6px 10px;
  background: #fffbe6;
  border-left: 3px solid #faad14;
  font-size: 12px;
  color: #874d00;
  border-radius: 0 4px 4px 0;
}
.makeup-hint b { color: #d4380d; }

/* =============== R69：工人考勤表（Excel 模板复刻） =============== */
.attendance-xlsx-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d2129;
  text-align: center;
  margin: 8px 0 4px;
  letter-spacing: 2px;
}
.attendance-xlsx-subtitle {
  font-size: 12px;
  color: #4e5969;
  text-align: center;
  margin-bottom: 12px;
}
.attendance-xlsx-wrap {
  overflow-x: auto;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
}
.attendance-xlsx-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  background: #fff;
}
.attendance-xlsx-table th,
.attendance-xlsx-table td {
  border: 1px solid #d9d9d9;
  text-align: center;
  vertical-align: middle;
  height: 32px;
  padding: 0 4px;
  color: #1d2129;
}
.attendance-xlsx-table thead th {
  background: #f5f7fa;
  color: #1d2129;
  font-weight: 500;
}
.attendance-th-axis {
  background: #fafafa !important;
  font-weight: 600 !important;
  color: #1d2129 !important;
  writing-mode: horizontal-tb;
}
.attendance-day-num { background: #fafafa; color: #1d2129; font-weight: 500; }
.attendance-day-num.is-disabled { background: #f5f5f5; color: #c9cdd4; }
.attendance-shift { background: #f5f7fa; color: #595959; font-size: 11px; font-weight: 500; }
.attendance-shift.is-disabled { background: #f5f5f5; color: #c9cdd4; }
.attendance-cell-seq { background: #fafbfc; color: #4e5969; font-weight: 500; }
.attendance-cell-name { background: #fffbe6; color: #1d2129; font-weight: 500; }
.attendance-cell-shift { font-family: 'Menlo','Monaco','Consolas',monospace; font-size: 13px; }
.attendance-cell-shift.is-day { color: #d4380d; }       /* 白班红字 */
.attendance-cell-shift.is-night { color: #1d2129; }
.attendance-cell-shift.is-full { background: #fff1f0; font-weight: 700; }
.attendance-cell-shift.is-half { background: #fffbe6; color: #d48806; font-weight: 600; }
.attendance-cell-shift.is-disabled { background: #f5f5f5; color: #d9d9d9; }
/* R84：补勤审核状态 — 让 pending/rejected 在日历格子上一眼可见 */
.attendance-cell-shift.is-pending  { background: #fff7e6; color: #d46b08; font-weight: 700; }
.attendance-cell-shift.is-rejected { background: #fff1f0; color: #cf1322; font-weight: 700; text-decoration: line-through; }
.attendance-cell-total { background: #fff7e6; color: #d4380d; font-weight: 700; }
/* ★ R230：31 天表格较宽时，「合计 / 补勤」两列固定在右侧（不再被横向裁切） */
.attendance-xlsx-table th.att-sticky-total,
.attendance-xlsx-table td.attendance-cell-total {
  position: sticky;
  right: 80px;
  z-index: 2;
}
.attendance-xlsx-table th.att-sticky-makeup,
.attendance-xlsx-table td.attendance-cell-makeup {
  position: sticky;
  right: 0;
  z-index: 2;
}
.attendance-cell-makeup,
.attendance-cell-total { box-shadow: -1px 0 0 #d9d9d9; }
.attendance-cell-sign { background: #fafbfc; }
.attendance-xlsx-signline {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  padding: 0 8px;
  font-size: 12px;
  color: #4e5969;
}
.attendance-xlsx-signline span { white-space: nowrap; }
.attendance-xlsx-note {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f5f7fa;
  border-left: 3px solid #1677ff;
  color: #4e5969;
  font-size: 12px;
  line-height: 1.7;
  border-radius: 0 4px 4px 0;
}

/* 日历格子（1~31 日） */
.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}
.attendance-cell {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: default;
}
.attendance-cell-empty {
  color: #bfbfbf;
  background: #fafafa;
  border-color: #f0f0f0;
}
.attendance-cell-normal   { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
.attendance-cell-late     { background: #fffbe6; color: #d48806; border-color: #ffe58f; }
.attendance-cell-early    { background: #fff2e8; color: #d4380d; border-color: #ffbb96; }
.attendance-cell-absent   { background: #fff1f0; color: #cf1322; border-color: #ffa39e; }
.attendance-cell-overtime { background: #e6f7ff; color: #096dd9; border-color: #91d5ff; }

.attendance-detail-stats {
  margin-top: 12px;
  font-size: 12px;
  color: #8c8c8c;
  padding: 8px 10px;
  background: #fafafa;
  border-radius: 4px;
}

.attendance-empty {
  text-align: center;
  color: #bfbfbf;
  padding: 32px 0;
  font-size: 13px;
}

.attendance-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 9999;
  animation: attendance-toast-in .2s ease-out;
}
.attendance-toast-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.attendance-toast-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
@keyframes attendance-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============== R31：OCR 自动识别弹窗 ============== */
.realkyc-ocr-loading {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .55);
}
.realkyc-ocr-loading[hidden] { display: none; }
.realkyc-ocr-loading-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
  min-width: 260px;
}
.realkyc-ocr-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  border: 3px solid #e6e8ec;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: realkyc-ocr-spin 0.9s linear infinite;
}
@keyframes realkyc-ocr-spin {
  to { transform: rotate(360deg); }
}
.realkyc-ocr-loading-text {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 500;
}
.realkyc-ocr-loading-hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* OCR 弹窗（识别结果预览） */
.realkyc-ocr-modal {
  width: 680px;
  max-width: 92vw;
  padding: 22px 24px 20px;
}
.realkyc-ocr-modal h3 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.realkyc-ocr-modal h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}
.ocr-preview-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  margin-bottom: 12px;
}
.ocr-preview-img {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
}
.ocr-preview-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ocr-preview-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}
.ocr-field {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px 10px;
  background: #fafbfc;
  transition: border-color .15s, background .15s;
}
.ocr-field.is-empty {
  opacity: 0.55;
  background: #f5f7fa;
}
.ocr-field-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  cursor: pointer;
}
.ocr-field-cb {
  margin: 0;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;          /* ★ R247：勾选框不被 flex 挤压/错位 */
  cursor: pointer;
}
.ocr-field-cb:disabled {
  cursor: not-allowed;
}
.ocr-field-label {
  font-weight: 500;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;        /* ★ R247：点标签文字也能勾选 */
  flex: 0 1 auto;
  min-width: 0;
}
.ocr-conf-tag {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f0f3f7;
  color: var(--text-dim);
}
.ocr-conf-tag.conf-high   { background: #dcfce7; color: #166534; }
.ocr-conf-tag.conf-medium { background: #fef3c7; color: #92400e; }
.ocr-conf-tag.conf-low    { background: #fee2e2; color: #991b1b; }
.ocr-conf-tag.conf-none   { background: #f0f3f7; color: #94a3b8; }
.ocr-field-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
}
.ocr-field-input:focus {
  outline: none;
  border-color: var(--primary);
}
.ocr-field-input:disabled {
  background: #f5f7fa;
  color: #b8bcc7;
  cursor: not-allowed;
}
.ocr-field-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
.realkyc-ocr-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  font-size: 12px;
  color: #7c5a00;
  margin-bottom: 12px;
}
.realkyc-ocr-tip svg { flex: 0 0 auto; color: #d48806; }
.realkyc-ocr-tip strong { color: #ad6800; font-weight: 600; }

.ocr-cancel-btn { min-width: 110px; }
.ocr-apply-btn  { min-width: 140px; }
.ocr-back-btn   { min-width: 100px; }

/* ★ R247 · 弹窗内提示条（失败原因 / 确认清单一律渲染在这里 ⇒ 任何场景都看得见） */
.ocr-apply-msg {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
  word-break: break-all;
  white-space: pre-wrap;
}
.ocr-apply-msg[hidden] { display: none !important; }
.ocr-apply-msg-ok {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}
.ocr-apply-msg-err {
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
}
.ocr-apply-msg-warn {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #7c5a00;
}

/* ★ R247 · 窄屏：证件缩略图与字段列表改为上下排（原来 220px + 1fr 会把右列挤窄） */
@media (max-width: 640px) {
  .realkyc-ocr-modal { padding: 16px 14px 14px; }
  .ocr-preview-grid { grid-template-columns: 1fr !important; gap: 10px; }
  .ocr-preview-img { height: 72px; }
  .ocr-preview-fields { max-height: none; }
  .ocr-field-check { font-size: 12px; }
  .modal-actions { flex-wrap: wrap; }
  .ocr-cancel-btn, .ocr-apply-btn, .ocr-back-btn { min-width: 0; flex: 1 1 auto; }
}

/* R31.1 P0 保护：被校验位拒绝的字段高亮 */
.ocr-field.ocr-rejected .ocr-field-input {
  border-color: #fecaca !important;
  background: #fef2f2 !important;
  color: #991b1b;
}
.ocr-field.ocr-rejected .ocr-field-cb {
  outline: 2px solid #fca5a5;
  outline-offset: 1px;
}

/* R31.1：识别建议候选段列表 */
.ocr-candidates {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.ocr-candidates-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.ocr-candidates-head svg { color: var(--primary); }
.ocr-candidates-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ocr-cand-chip {
  font-size: 11px;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'SF Mono', Consolas, monospace;
}

/* =====================================================================
   R65 工资台账（资金 → 工资台账）
   8 列：姓名 / 身份证号 / 银行卡号 / 联系电话 / 工资标准 / 考勤天数 / 加班天数 / 实发工资
   "工资标准"列做行内编辑；实发工资在前端实时重算
===================================================================== */
.salary-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px 22px;
  margin: 0 0 18px;
}

/* R131 · 工资台账 KPI 强调色（与 totals 协调） */
.kpi-card.kpi-gross::before    { background: #6366f1; }   /* 紫 - 应发合计 */
.kpi-card.kpi-full::before     { background: #10b981; }   /* 绿 - 满勤 */

.salary-meta {
  font-size: 13px;
  color: var(--text-dim);
}
.salary-meta strong { color: var(--text); font-weight: 600; }

/* 工具栏右侧"应发合计"展示 */
.salary-totals {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  color: #0f3b34;
  font-size: 13px;
}
.salary-total-chip {
  color: #0e7c66;
  font-weight: 500;
}
.salary-total-value {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 14px;
  color: #064e3b;
}

/* 8 列比例（合计 100%）：
   · 姓名 8%（"张三等"3 字有 80px，不溢出）
   · 身份证 14%（18 位 + 空格 ≈ 19 个字符）
   · 银行卡 14%
   · 电话 9%（11 位手机）
   · 工资标准 12%（"¥ 320.00 / 天"放得下，inline 编辑也能装下 input）
   · 考勤 8%
   · 加班 8%
   · 实发工资 13%（最长字段"¥ 9999.99"），右对齐 */
.salary-table col.c-name   { width: 8%;  }
.salary-table col.c-id     { width: 12%; }
.salary-table col.c-bank   { width: 12%; }
.salary-table col.c-phone  { width: 8%;  }
.salary-table col.c-rate   { width: 10%; }
.salary-table col.c-att    { width: 7%;  }
.salary-table col.c-ot     { width: 7%;  }
.salary-table col.c-gross  { width: 11%; }
.salary-table col.c-deduct { width: 12%; }    /* R144 · 借支抵扣列(可能含 pill 徽章) */
.salary-table col.c-net    { width: 13%; }    /* R144 · 实发工资列(最右突出) */
.salary-table col.c-id,
.salary-table col.c-bank,
.salary-table col.c-phone  { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* R144 · 借支抵扣单元格的视觉提示 */
.salary-table .salary-deduct         { color: var(--muted); font-size: 12px; }
.salary-table .salary-deduct-active  { color: var(--text);  font-weight: 500; }
.salary-table .salary-deduct-link    {
  color: #d97706;                      /* 橙色,与 .pill-warn 一致 */
  text-decoration: none;
  border-bottom: 1px dashed #d97706;
  padding-bottom: 1px;
}
.salary-table .salary-deduct-link:hover {
  color: #b45309;
  background: #fef3c7;
  border-radius: 3px;
  padding: 2px 4px;
}
.salary-table .salary-net              { color: var(--text); font-size: 14px; }
.salary-table .salary-net strong       { color: #047857; }   /* 绿色 = 最终到手金额 */

/* R94 · 工资标准改为只读(删除可调整):不再有点击 / hover / 编辑态
   · 保留主色 var(--primary) 让数字保持强调感(信息层级:金额 > 数值 > 文本)
   · .is-empty 用于空值("—")灰底斜体 */
.salary-table .salary-rate-cell {
  color: var(--primary);
  font-weight: 500;
}
.salary-table .salary-rate-text.is-empty {
  color: var(--text-dim);
  font-weight: 400;
  font-style: italic;
}
/* R94 · 已删除:salary-rate-cell:hover / .is-editing / salary-rate-input / salary-rate-unit
   · 工资标准在工人档案 / 项目与人员阶段预设,此处仅展示,不提供调整入口
   · 若日后需重新支持行内编辑,可从 git history 恢复本段

/* 数字列右对齐 + 等宽 */
.salary-table .salary-att,
.salary-table .salary-ot {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--text);
}
.salary-table .salary-gross {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: #0e7c66;
  background: rgba(16, 185, 129, .04);
}

/* 实发工资为 0 时（如工资标准未配置）给弱化色 */
.salary-table .salary-gross.is-zero {
  color: var(--text-dim);
  background: transparent;
  font-weight: 400;
}

/* ============== R74：工人明细（个人核心管理档案 · 点行展开）============== */

.worker-detail-section {
  margin: 0 0 18px;
}
.worker-detail-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.worker-detail-head .section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.worker-detail-sub {
  font-size: 12px;
  color: var(--text-dim);
}
.worker-detail-empty {
  padding: 36px 0;
  text-align: center;
  background: #fafafa;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
}
.worker-detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.worker-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}
.worker-detail-field {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.worker-detail-field-wide {
  grid-column: 1 / -1;
}
.worker-detail-lbl {
  flex: 0 0 80px;
  color: var(--text-dim);
  font-size: 12px;
}
.worker-detail-val {
  color: var(--text);
  flex: 1;
  word-break: break-all;
}
.worker-detail-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.worker-detail-certs {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.worker-detail-certs-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.worker-detail-certs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.worker-detail-cert-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.worker-detail-cert-thumb {
  width: 100%;
  height: 160px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
}
.worker-detail-cert-thumb:hover { border-color: var(--primary); }
.worker-detail-cert-thumb.is-empty {
  cursor: default;
  background: #f1f5f9;
}
.worker-detail-cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fafafa;
}
.worker-detail-cert-empty {
  color: var(--text-dim);
  font-size: 12px;
}

/* ============== R278 · 工人明细弹窗（工人管理点行弹出 · 实名登记内容） ===============
   三段式：head 固定 / body 唯一滚动区 / 无 footer（只读无操作） */
.worker-detail-modal {
  width: 780px;
  max-width: 96vw;
  max-height: 88vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;               /* 滚动只发生在 .wdm-body */
}
.wdm-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.wdm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wdm-title h3 {
  margin: 0;
  font-size: 16px;
}
.wdm-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wdm-badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.wdm-badge.pending  { background: #fffbeb; color: #b45309; }
.wdm-badge.approved { background: #f0fdf4; color: #15803d; }
.wdm-badge.rejected { background: #fef2f2; color: #b91c1c; }
.wdm-badge.expired  { background: #f1f5f9; color: #475569; }
.wdm-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;               /* 唯一滚动区 */
  padding: 16px 20px;
}
.wdm-body .loading {
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
}
.wdm-body .roster-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.worker-detail-modal .modal-close {
  font-size: 22px;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #86909c;
  cursor: pointer;
  padding: 0 4px;
  flex: 0 0 auto;
}
.worker-detail-modal .modal-close:hover { color: #1d2129; }

/* R74：证件图大图预览 */
.cert-preview-box {
  width: 720px;
  max-width: 96vw;
  max-height: 90vh;
}
.cert-preview-box .modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: #0f172a;
}
.cert-preview-box .modal-body img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

/* R74：表格行 hover 提示 + 可点击态 */
.roster-table tbody tr {
  cursor: pointer;
  transition: background .12s;
}
.roster-table tbody tr:hover {
  background: #f8fafc;
}
/* R94 · 工资台账行不需要点选/行级 click handler,覆盖 .roster-table 的 pointer cursor
   · 保留 :hover 变色(让用户视觉看得出哪行)
   · 工资标准 td 内部也不可编辑,所以整行回到 default */
.salary-table tbody tr { cursor: default; }
.roster-table tbody tr.is-selected {
  background: #e6f4ff;
}

/* =====================================================================
   R96 · 合规 → 企业资质（tenant 端 · compliance-company）
   ----------------------------------------------------------------------
   Layout：
     .company-section       — 卡片分块(每块对应一个资质类型)
     .company-section-head  — 块标题 + 灰色提示
     .company-card-bl       — 营业执照卡片(预览 + 元数据 + 操作)
     .company-emp-grid      — 员工证件网格 3 列
   视觉：对齐钉钉风、modal 大图查看、toast 通知已对齐到其他 R 模块
   ===================================================================== */

.company-section {
  margin: 0 0 18px;            /* R93 · 全宽不再被容器压住 */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px 20px;
  box-shadow: var(--shadow);
}
.company-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.company-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.company-hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* ---------- 营业执照卡片 ---------- */
.company-card-bl {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.company-bl-preview {
  width: 320px;
  max-width: 100%;
  min-height: 200px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.company-bl-img {
  max-width: 100%;
  max-height: 360px;
  display: block;
  cursor: zoom-in;        /* R96 · 与缩略图点击放大交互对齐 */
  background: #fff;
}
.company-bl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}
.company-bl-empty-text {
  font-size: 13px;
}
.company-bl-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  min-width: 200px;
}
.company-bl-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.company-bl-label {
  font-size: 12px;
  color: var(--text-dim);
}
.company-bl-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.company-bl-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.company-bl-actions button.sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ---------- 员工证件网格 ---------- */
.company-emp-certs-box {
  min-height: 80px;
}
.company-emp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1100px) {
  .company-emp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .company-emp-grid { grid-template-columns: 1fr; }
}
.company-emp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .12s, border-color .12s;
}
.company-emp-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
}
.company-emp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.company-emp-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.company-emp-name strong {
  font-size: 14px;
  color: var(--text);
}
.company-emp-idno {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.company-emp-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.company-emp-thumb-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.company-emp-thumb-lbl {
  font-size: 11px;
  color: var(--text-dim);
}
.company-thumb {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.company-thumb.thumb-ok { cursor: zoom-in; }
.company-thumb.thumb-empty { background: #f1f5f9; }
.company-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

/* ---------- 审核状态 badge(复用 realname 视觉,但独立类) ---------- */
.company-audit {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.company-audit-pending  { background: #fff7e6; color: #d46b08; border: 1px solid #ffe7ba; }
.company-audit-approved { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.company-audit-rejected { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.company-audit-expired  { background: #f5f5f5; color: #595959; border: 1px solid #d9d9d9; }

/* ---------- 空/错误状态 ---------- */
.company-empty,
.company-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 12px;
  color: var(--text-dim);
  text-align: center;
}
.company-error {
  color: var(--danger);
  background: #fff1f0;
  border: 1px solid #ffa39e;
  border-radius: 8px;
}
.company-empty-text {
  font-size: 14px;
}
.company-empty-hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* ---------- R132 · 合规 → 企业资质 升级 ----------
   · KPI 卡(与全站统一)
   · 员工证件区块改成表格(可筛选/搜索)
*/
.company-kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.company-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  margin: 0 0 14px; padding: 12px 14px;
  background: #fafbfc; border: 1px solid var(--border); border-radius: 10px;
}
.company-pick { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.company-pick-grow { flex: 1; min-width: 200px; }
.company-toolbar .company-select,
.company-toolbar .company-input {
  height: 32px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 13px; color: var(--text);
}
.company-toolbar .company-select:focus,
.company-toolbar .company-input:focus { outline: none; border-color: var(--primary); }
.company-table-wrap {
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: #fff;
}
.company-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.company-table th,
.company-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; }
.company-table th {
  background: #f8fafc; font-weight: 600; color: var(--text-dim);
  font-size: 12px; letter-spacing: 0.3px; text-transform: uppercase;
}
.company-table tbody tr:hover { background: #f9fafb; }
.company-table .col-mono  { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.company-table .col-thumb { width: 78px; }
.company-table .col-thumb img { width: 56px; height: 36px; object-fit: cover; border-radius: 4px; cursor: zoom-in; }
.company-table .col-thumb .thumb-mini-empty {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 36px; border: 1px dashed #cbd5e1; border-radius: 4px; color: #94a3b8;
}
.company-table-foot {
  padding: 10px 14px; font-size: 12px; color: var(--text-dim);
  background: #fafbfc; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
@media (max-width: 900px) {
  .company-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi-card.kpi-bl-yes::before  { background: #10b981; }   /* 绿 - 营业执照已上传 */
.kpi-card.kpi-bl-no::before   { background: #ef4444; }   /* 红 - 营业执照未上传 */

/* ---------- 大图查看 modal ---------- */
.modal-box-img { width: min(720px, 92vw); }
.company-modal-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  max-height: 70vh;
  overflow: auto;
}
.company-modal-img-wrap img {
  max-width: 100%;
  max-height: 65vh;
  display: block;
  background: #fff;
}

/* ---------- Toast ---------- */
.company-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
}
.company-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.company-toast.success { background: #16a34a; }
.company-toast.error   { background: var(--danger); }
.company-toast.info    { background: var(--text); }

/* 通用 .sm button(若未定义) */
button.sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}
.ghost.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid #ffa39e;
}
.ghost.danger:hover {
  background: #fff1f0;
  border-color: var(--danger);
}

/* =====================================================================
 * R98 · 合规 → 报表中心
 * --------------------------------------------------------------------- */
.reports-section {
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
}
.reports-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}
.reports-section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.reports-hint {
  color: var(--text-dim);
  font-size: 12px;
}

/* ----- 按项目卡片网格(R98 · R101 弃用,改用 .reports-single-toolbar) ----- */
.reports-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.reports-proj-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s;
}
.reports-proj-card:hover {
  border-color: var(--primary);
}
.reports-proj-card-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.reports-proj-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.reports-proj-meta {
  color: var(--text-dim);
  font-size: 12px;
}
.reports-proj-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.reports-proj-actions button {
  flex: 1;
  min-width: 90px;
}

/* ----- 全局 toolbar ----- */
.reports-global-toolbar,
.reports-single-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 6px 0;
}
.reports-toolbar-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.reports-toolbar-label > span {
  color: var(--text-dim);
  font-size: 12px;
}
.reports-select,
.reports-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  outline: none;
}

/* R133 · 报表中心 升级(KPI + 标签页) */
.reports-tabs {
  display: flex; gap: 4px; margin: 0 0 12px;
  border-bottom: 1px solid var(--border);
}
.reports-tab {
  padding: 8px 18px; border: none; background: transparent;
  cursor: pointer; font-size: 14px; color: var(--text-dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.reports-tab:hover { color: var(--text); }
.reports-tab.is-active {
  color: var(--primary); border-bottom-color: var(--primary); font-weight: 600;
}
.reports-tab-pane { display: none; }
.reports-tab-pane.is-active { display: block; }

.reports-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.reports-action-card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 8px;
}
.reports-action-card-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.reports-action-card-sub {
  font-size: 12px; color: var(--text-dim);
}
.reports-action-card-btns {
  display: flex; gap: 8px;
}
.reports-action-card-btns button { flex: 1; }

.kpi-card.kpi-proj-active::before  { background: #10b981; }   /* 绿 - 在建 */
.kpi-card.kpi-proj-closed::before  { background: #f59e0b; }   /* 橙 - 已完结 */
.kpi-card.kpi-rpt-kind::before     { background: #6366f1; }   /* 紫 - 报表种类 */
.reports-select:focus,
.reports-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.reports-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
/* R101 · 按项目 section:工具栏按钮 2 行排列(花名册+下载 / 考勤+下载 / 工资+下载) */
.reports-toolbar-actions-row {
  margin-left: 0;
  flex-basis: 100%;
  padding-top: 4px;
}
}

/* ----- 状态 / 提示 ----- */
.reports-empty,
.reports-error {
  padding: 28px 12px;
  text-align: center;
  color: var(--text-dim);
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.reports-error {
  color: var(--danger);
  background: #fff1f0;
  border-color: var(--danger);
}
.loading {
  padding: 18px;
  text-align: center;
  color: var(--text-dim);
}

/* ----- Toast ----- */
.reports-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -10px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
  z-index: 1100;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.reports-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.reports-toast.success { border-color: #389e0d; color: #389e0d; }
.reports-toast.error   { border-color: #cf1322; color: #cf1322; }
.reports-toast.info    { border-color: var(--primary); color: var(--primary); }

/* ----- 预览 Modal ----- */
.reports-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.reports-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px);
}
.reports-modal-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1500px, 96vw);     /* R99 · 考勤表 xlsx 62 列很宽,放宽到 1500 */
  max-height: 86vh;
  background: #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
.reports-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.reports-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.reports-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.reports-modal-close:hover { color: var(--danger); background: #f1f5f9; }
.reports-modal-body {
  padding: 16px 20px;
  overflow: auto;
}

/* ----- 预览 meta ----- */
.reports-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 0 12px;
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.reports-preview-meta b { color: var(--text); font-weight: 600; }

/* ----- 预览表格 ----- */
.reports-table-scroll {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.reports-table thead th {
  background: #f1f5f9;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}
.reports-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
}
.reports-table tbody tr:hover { background: #f8fafc; }
.reports-table .num      { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.reports-table .center   { text-align: center; }
.reports-table .right    { text-align: right; font-weight: 600; }
/* R102 · 花名册 11 列对齐 xlsx 模板(1.工人花名册.xlsx)
 *   序号 / 姓名 / 性别 / 年龄 / 身份证号 / 家庭住址 / 联系电话
 *   / 工种 / 持证情况 / 紧急联系人 / 联系人电话
 * 列宽近似 xlsx 列宽比例(11.0 个 char unit 总宽) */
.reports-table-roster col,
.reports-table-roster thead th { width: auto; }
.reports-table-roster th:nth-child(1),  .reports-table-roster td:nth-child(1)  { width: 6%;   }  /* 序号 */
.reports-table-roster th:nth-child(2),  .reports-table-roster td:nth-child(2)  { width: 9%;   }  /* 姓名 */
.reports-table-roster th:nth-child(3),  .reports-table-roster td:nth-child(3)  { width: 5%;   }  /* 性别 */
.reports-table-roster th:nth-child(4),  .reports-table-roster td:nth-child(4)  { width: 5%;   }  /* 年龄 */
.reports-table-roster th:nth-child(5),  .reports-table-roster td:nth-child(5)  { width: 17%;  }  /* 身份证号(F:G merged) */
.reports-table-roster th:nth-child(6),  .reports-table-roster td:nth-child(6)  { width: 18%;  }  /* 家庭住址 */
.reports-table-roster th:nth-child(7),  .reports-table-roster td:nth-child(7)  { width: 11%;  }  /* 联系电话 */
.reports-table-roster th:nth-child(8),  .reports-table-roster td:nth-child(8)  { width: 9%;   }  /* 工种 */
.reports-table-roster th:nth-child(9),  .reports-table-roster td:nth-child(9)  { width: 9%;   }  /* 持证情况 */
.reports-table-roster th:nth-child(10), .reports-table-roster td:nth-child(10) { width: 9%;   }  /* 紧急联系人 */
.reports-table-roster th:nth-child(11), .reports-table-roster td:nth-child(11) { width: 12%;  }  /* 联系人电话 */
.reports-table tfoot td {
  background: #f1f5f9;
  border-top: 2px solid var(--border);
  padding: 8px 10px;
  font-weight: 600;
}

/* ----- 考勤矩阵特殊样式 ----- */
.reports-table-att .att-name-col  { min-width: 96px; }
.reports-table-att .att-team-col  { min-width: 80px; }
.reports-table-att .att-day-col   { width: 22px; padding: 4px; text-align: center; font-weight: 400; color: var(--text-dim); }
.reports-table-att .att-stat-col  { min-width: 110px; font-size: 11.5px; color: var(--text-dim); }
.reports-table-att .att-cell      { padding: 4px 2px; text-align: center; font-size: 11px; }
.att-worker-name { font-weight: 500; }

.att-cell-normal   { color: #1d4ed8; background: #eff6ff; }
.att-cell-late     { color: #c2410c; background: #fff7ed; }
.att-cell-early    { color: #6d28d9; background: #f5f3ff; }
.att-cell-absent   { color: #b91c1c; background: #fef2f2; }
.att-cell-overtime { color: #15803d; background: #f0fdf4; }
.att-cell-empty    { color: #cbd5e1; }

/* ----- 考勤图例 ----- */
.reports-legend {
  display: flex;
  gap: 14px;
  padding: 10px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.reports-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.reports-legend i.att-cell-normal   { background: #eff6ff; border: 1px solid #93c5fd; }
.reports-legend i.att-cell-late     { background: #fff7ed; border: 1px solid #fdba74; }
.reports-legend i.att-cell-early    { background: #f5f3ff; border: 1px solid #c4b5fd; }
.reports-legend i.att-cell-absent   { background: #fef2f2; border: 1px solid #fca5a5; }
.reports-legend i.att-cell-overtime { background: #f0fdf4; border: 1px solid #86efac; }
.reports-legend i.att-cell-empty    { background: #f8fafc; border: 1px solid #cbd5e1; }

/* =====================================================================
   R99 · 考勤表按 xlsx 模板格式重做
   - 模板: C:\Users\xyzj9\Desktop\2.工人考勤表.xlsx
   - 66 列布局: 序号 + 姓名 + 31天(白晚拆分=62) + 合计(天) + 签名
   - 自动填: √全天 / ◐半天 / 空(无记录或缺勤)
   - 顶部大标题 + 6 元数据栏 + 底部签名 + 备注
   ===================================================================== */
.reports-att-xlsx {
  font-family: "Microsoft YaHei", "微软雅黑", "宋体", sans-serif;
  background: #fff;
  border: 1px solid #1f2937;
  font-size: 12px;
  color: #111;
  padding: 0;
  width: 100%;
}
.reports-att-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  font-family: "华文中宋", "宋体", serif;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 8px;
  padding: 14px 0 10px;
  border-bottom: 2px solid #1f2937;
  background: #fffbe6;
}
.reports-att-projectname { color: #0f172a; }
.reports-att-titlename   { margin-left: 14px; color: #0f172a; }

.reports-att-sheet {
  overflow-x: auto;
  background: #fff;
}
.reports-att-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  background: #fff;
}
.reports-att-table th,
.reports-att-table td {
  border: 1px solid #1f2937;
  padding: 4px 2px;
  text-align: center;
  vertical-align: middle;
  font-size: 11px;
  line-height: 1.2;
  word-break: break-all;
}

/* 列宽 colgroup */
.reports-att-table col.att-col-idx   { width: 36px; }
.reports-att-table col.att-col-name  { width: 70px; }
.reports-att-table col.att-col-day   { width: 20px; }
.reports-att-table col.att-col-total { width: 56px; }
.reports-att-table col.att-col-sign  { width: 80px; }

/* 元数据栏(2 行 × 6 段) */
.att-meta-row td {
  font-weight: 500;
  padding: 5px 6px;
}
.att-meta-label {
  background: #fffbe6;
  color: #1f2937;
  text-align: center;
}
.att-meta-value {
  background: #fff;
  color: #4b5563;
  font-weight: normal;
}

/* 表头 */
.att-idx-th,
.att-name-th,
.att-total-th,
.att-sign-th {
  background: #fffbe6;
  font-weight: bold;
  white-space: nowrap;
  font-size: 12px;
}
.att-date-th {
  background: #fffbe6;
  font-weight: normal;
  padding: 3px 2px;
  font-size: 11px;
}
.att-shift-th {
  background: #fffbe6;
  font-weight: normal;
  font-size: 10px;
  padding: 2px 0;
}
.att-shift-th.att-shift-night {
  border-left-style: dashed;
}

/* 数据行 */
.att-idx {
  background: #fffbe6;
  font-weight: 500;
}
.att-name-col {
  background: #fff;
  font-weight: 500;
  text-align: left !important;
  padding-left: 6px !important;
}
.att-worker-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.att-shift {
  background: #fff;
  font-family: "Arial Unicode MS", "Segoe UI Symbol", "DejaVu Sans", sans-serif;
  font-weight: 900;
  font-size: 16px;
  padding: 2px 0 !important;
  line-height: 1;
}
.att-shift.full { color: #1d4ed8; }   /* 蓝 ✔ */
.att-shift.half { color: #ea580c; }   /* 橙 ◑ */
.att-shift.none { color: #e2e8f0; }
.att-shift.att-shift-night { border-left-style: dashed; }

.att-total {
  background: #fffbe6;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}
.att-sign {
  background: #fffbe6;
}

/* 底部签名栏(4 角色) */
.reports-att-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px 8px;
  font-size: 12px;
  border-top: 2px solid #1f2937;
  background: #fffbe6;
  gap: 12px;
  flex-wrap: wrap;
}
.att-sign-line {
  display: inline-block;
  width: 110px;
  border-bottom: 1px solid #1f2937;
  margin-left: 4px;
  vertical-align: bottom;
  height: 14px;
}

/* 备注 */
.reports-att-notes {
  padding: 6px 14px 10px;
  font-size: 11px;
  color: #4b5563;
  border-top: 1px dashed #9ca3af;
  background: #fafafa;
}

/* 滚动条美化(62 列很长,需横滚) */
.reports-att-sheet::-webkit-scrollbar { height: 10px; }
.reports-att-sheet::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
.reports-att-sheet::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =====================================================================
   R100 · 工资表(报表中心)按 xlsx 模板重做
   模板: 3.工资结算表.xlsx · 11 列(A-K) · 含项目元数据 + 表头 + 47 数据行 + 合计 + 4 段签字
   ===================================================================== */
.reports-sal-xlsx {
  font-family: "Microsoft YaHei", "微软雅黑", "宋体", sans-serif;
  background: #fff;
  border: 1px solid #1f2937;
  font-size: 12px;
  color: #111;
  padding: 0;
  width: 100%;
}
.reports-sal-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  font-family: "华文中宋", "宋体", serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  padding: 12px 0 8px;
  border-bottom: 2px solid #1f2937;
  background: #fffbe6;
}
.reports-sal-projectname { color: #0f172a; margin-right: 12px; }
.reports-sal-titlename   { color: #0f172a; }

.reports-sal-sheet {
  overflow-x: auto;
  background: #fff;
}
.reports-sal-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  background: #fff;
}
.reports-sal-table th,
.reports-sal-table td {
  border: 1px solid #1f2937;
  padding: 4px 4px;
  text-align: center;
  vertical-align: middle;
  font-size: 11px;
  line-height: 1.2;
}
/* 列宽:对齐 xlsx */
.reports-sal-table col.sal-col-idx    { width: 36px; }   /* A 序号 4.5 */
.reports-sal-table col.sal-col-name   { width: 80px; }   /* B 姓名   默认 */
.reports-sal-table col.sal-col-id     { width: 180px; }  /* C 身份证 23.44 */
.reports-sal-table col.sal-col-bank   { width: 180px; }  /* D 银行卡 23.19 */
.reports-sal-table col.sal-col-phone  { width: 110px; }  /* E 电话   14.44 */
.reports-sal-table col.sal-col-rate   { width: 95px; }   /* F 标准   默认 */
.reports-sal-table col.sal-col-att    { width: 38px; }   /* G 考勤   4.94 */
.reports-sal-table col.sal-col-ot     { width: 38px; }   /* H 加班   4.82 */
.reports-sal-table col.sal-col-gross  { width: 100px; }  /* I 实发   默认 */
.reports-sal-table col.sal-col-sign   { width: 80px; }   /* J 签字   默认 */
.reports-sal-table col.sal-col-note   { width: 130px; }  /* K 备注   16.69 */

.sal-meta-label {
  background: #fffbe6;
  color: #1f2937;
  text-align: center;
  font-weight: 500;
}
.sal-meta-value {
  background: #fff;
  color: #4b5563;
  font-weight: normal;
  text-align: left;
  padding-left: 10px !important;
}
.sal-headline {
  font-family: "华文中宋", "宋体", serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 4px;
  padding: 10px 6px !important;
  background: #fffbe6;
}
.sal-thead-row th {
  background: #fffbe6;
  font-weight: bold;
  font-size: 12px;
}

/* 数据行 */
.sal-idx   { background: #fffbe6; font-weight: 500; }
.sal-name  { background: #fff; text-align: left !important; padding-left: 6px !important; }
.sal-id,
.sal-bank,
.sal-phone { text-align: left !important; padding-left: 6px !important; }
.mono      { font-family: "JetBrains Mono", "Consolas", monospace; font-size: 10px; }
.sal-rate  { font-variant-numeric: tabular-nums; }
.sal-att,
.sal-ot,
.sal-gross { font-variant-numeric: tabular-nums; font-weight: 500; }
.num       { text-align: center; font-variant-numeric: tabular-nums; }
.sal-sign  { background: #fff; }
.sal-note  { text-align: left; padding-left: 6px; color: #4b5563; font-size: 10px; }

/* 合计行 */
.sal-total-row { font-weight: bold; }
.sal-total-label {
  background: #fffbe6;
  text-align: center;
  font-size: 13px;
  letter-spacing: 4px;
}
.sal-total-cell { background: #fffbe6; }

/* 底部 4 段签字栏 */
.reports-sal-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px 8px;
  font-size: 12px;
  border-top: 2px solid #1f2937;
  background: #fffbe6;
  gap: 12px;
  flex-wrap: wrap;
}
.sal-sign-line {
  display: inline-block;
  width: 100px;
  border-bottom: 1px solid #1f2937;
  margin-left: 4px;
  vertical-align: bottom;
  height: 14px;
}

.reports-sal-notes {
  padding: 6px 14px 10px;
  font-size: 11px;
  color: #4b5563;
  border-top: 1px dashed #9ca3af;
  background: #fafafa;
}

.reports-sal-sheet::-webkit-scrollbar { height: 10px; }
.reports-sal-sheet::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
.reports-sal-sheet::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* ----- R106 · Worker · 我的资料 ----- */
.profile-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.profile-section h2 {
  font-size: 14px;
  margin: 0 0 12px 0;
  color: #1e293b;
  border-left: 3px solid #3b82f6;
  padding-left: 8px;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.profile-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
}
.profile-item label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}
.profile-item span {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}
.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.profile-table th,
.profile-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  text-align: left;
}
.profile-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
}

/* ----- R250 · 工人端「我的资料」· 分拣窗口（累计统计 KPI → 详情窗口） ----- */
.pf-sortwin {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.pf-sortwin-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.pf-sortwin-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  border-left: 3px solid #3b82f6;
  padding-left: 8px;
}
.pf-sortwin-tip {
  font-size: 11px;
  color: #94a3b8;
}
.pf-sort-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pf-sort-item {
  display: block;
  width: 100%;
  text-align: center;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 8px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: inherit;
}
.pf-sort-item:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .12);
}
.pf-sort-item:active { background: #dbeafe; }
.pf-sort-item:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.pf-sort-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.pf-sort-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}
.pf-sortwin-note {
  margin: 10px 0 0 0;
  font-size: 11px;
  color: #94a3b8;
}

/* R250 · 分拣详情窗口（弹窗） */
.pf-sort-modal { z-index: 1200; }
.pf-sort-box {
  width: 920px;
  max-width: 96vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 20px;
}
.pf-sort-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.pf-sort-head h3 { margin: 0; }
.pf-sort-x {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
}
.pf-sort-x:hover { color: #1e293b; }
.pf-sort-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.pf-sort-body .profile-table { font-size: 12px; }

@media (max-width: 640px) {
  .pf-sort-row { grid-template-columns: repeat(2, 1fr); }
  .pf-sort-box { max-height: 84vh; }
}

/* ----- R251 · 工人端「我的资料」· 卡片折叠（我的工作组 / 实名登记 / 我的工资 / 我的考勤） ----- */
/* ★ 用户原话：「折叠我的工作组、实名登记、我的工资、我的考勤」
   ★ 设计：标题行整行可点（<button>，可 Tab / 回车），右侧带摘要 + 箭头；
     折叠只是收起内容，**不阻断数据加载** ⇒ 摘要永远能显示关键数字。 */
.pf-fold-h { margin: 0 0 12px 0; }
/* ★ R325 · 实名登记卡头带「加入项目」按钮：卡名在左、按钮在右（两端对齐） */
.pf-fold-h.has-head-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pf-fold-h.has-head-act .pf-fold-row { flex: 1 1 auto; min-width: 0; }
.rn-join-head-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rn-join-head-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.rn-join-head-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.pf-fold-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pf-fold-row:hover .pf-fold-title { color: #2563eb; }
.pf-fold-row:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
  border-radius: 4px;
}
.pf-fold-title { flex: none; }
.pf-fold-sum {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-fold-sum.is-warn { color: #b45309; }
.pf-fold-sum.is-err  { color: #dc2626; }
.pf-fold-arrow {
  flex: none;
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
}
.pf-fold-arrow::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-right: 1.6px solid #475569;
  border-bottom: 1.6px solid #475569;
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.pf-fold-row.is-open .pf-fold-arrow::after {
  transform: rotate(-135deg);
  margin-top: -1px;
}
/* ★ hidden 必须能压住内容（.pf-fold-body 内有表格/卡片，默认 display:block） */
.pf-fold-body[hidden] { display: none !important; }
/* 折叠态：收紧下留白 */
.profile-section.is-folded .pf-fold-h { margin-bottom: 0; }

@media (max-width: 640px) {
  .pf-fold-sum { font-size: 11px; }
}
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.badge-approved { background: #dcfce7; color: #166534; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-expired  { background: #f3f4f6; color: #6b7280; }

/* R159 · 多租户徽章(员工端"在岗项目"中区分每个项目所属租户) */
.tenant-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
  white-space: nowrap;
}

/* =====================================================================
   R214 · Worker · 我的资料 → 实名登记（工作组维度）
   三态：无工作组 → 找活引导 / 普通成员 → 由管理员录入 / 管理员 → 协助录入
   ===================================================================== */

/* 按钮 */
.rn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  color: var(--text, #1e293b);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: filter .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.rn-btn:hover { filter: brightness(.97); }
.rn-btn.primary {
  background: var(--primary, #d97706);
  border-color: var(--primary, #d97706);
  color: #fff;
}
.rn-btn.primary:hover { background: var(--primary-2, #b45309); border-color: var(--primary-2, #b45309); }
.rn-btn.ghost {
  background: #fff;
  border-color: var(--border, #e2e8f0);
  color: var(--text-dim, #64748b);
}
.rn-btn.ghost:hover { border-color: var(--primary, #d97706); color: var(--primary, #d97706); }
.rn-btn.tiny { padding: 3px 10px; font-size: 12px; border-radius: 6px; }
.rn-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 无工作组空状态 */
.rn-empty {
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 10px;
  padding: 22px 18px;
  text-align: center;
}
.rn-empty-icon { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.rn-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
}
.rn-empty-text {
  font-size: 12.5px;
  color: #a16207;
  line-height: 1.7;
  margin: 0 0 14px;
}
.rn-empty-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* 我的实名状态条 */
.rn-mine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.rn-mine-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rn-mine-label { font-size: 12px; color: #64748b; }
.rn-mine-value {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 说明提示条 */
.rn-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 3px solid #3b82f6;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #1e40af;
  line-height: 1.7;
  margin-bottom: 12px;
}
.rn-tip b { font-weight: 600; }

/* 工作组卡片 */
.rn-group {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.rn-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f1f5f9;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.rn-group-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.rn-group-role {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}
.rn-group-role.mgr {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
  font-weight: 600;
}

/* ★ R226 · 三角色徽章（可叠加：租户用户 / 租户授权的管理用户 / 工人用户） */
.rn-role-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.rn-role-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.rn-role-owner {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
  font-weight: 600;
}
.rn-role-admin {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
  font-weight: 600;
}
.rn-role-worker {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.rn-group-grant {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f0f9ff;
  color: #0369a1;
  border: 1px dashed #7dd3fc;
  white-space: nowrap;
}
.rn-group-tip {
  padding: 5px 12px;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* ★ R226 · 身份全景横幅 */
.rn-identity-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.rn-ib-item {
  flex: 1 1 60px;
  min-width: 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rn-ib-num {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}
.rn-ib-label {
  font-size: 11px;
  color: #64748b;
}
.rn-table { font-size: 12px; }
.rn-table th, .rn-table td { border: 0; border-bottom: 1px solid #e2e8f0; }
.rn-table th { background: #fafafa; }
.rn-table tbody tr:last-child td { border-bottom: 0; }
.rn-hint { font-size: 12px; color: #94a3b8; }

/* 轻提示 */
.rn-toast {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.6;
}
.rn-toast-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.rn-toast-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* R237 · 全局浮层轻提示（worker 端通用，自带容器，不依赖 #rn-toast） */
.wb-toast {
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%);
  z-index: 9999; max-width: min(86vw, 440px);
  padding: 10px 16px; border-radius: 10px;
  font-size: 13px; line-height: 1.55; text-align: center;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .18);
  pointer-events: none; word-break: break-word;
}
.wb-toast[hidden] { display: none; }
.wb-toast-ok  { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.wb-toast-err { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* R237 · 轻量提示行
   ★ 别用 .empty —— .main .empty 是「空状态卡片」（padding 40px + 边框 + 底色），
     拿来放一行说明文字会撑出一大片空白。 */
.ws-tip {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ★ R301 · 工作内容筛选提示条（URL 显式带 projectId 时出现，给「查看全部」逃生口） */
.ws-filter-bar {
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.6;
}
.ws-filter-bar a { color: #b45309; font-weight: 600; text-decoration: underline; }

/* ★ R303 · 项目锁硬锁提示条（考勤打卡/工作汇报/借资申请 锁定时出现，
   指引换项目回「我的资料 → 我的项目」——选择器已收敛为单选项） */
.ws-lock-bar {
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 12px;
  color: #1e40af;
  line-height: 1.6;
}
.ws-lock-bar a { color: #1d4ed8; font-weight: 600; text-decoration: underline; }

/* 协助录入弹窗 */
.rn-assist-box { width: min(760px, 94vw); max-height: 90vh; overflow: auto; }
.rn-assist-box h3 { margin-bottom: 6px; }
.rn-assist-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: #1e40af;
  margin-bottom: 14px;
  line-height: 1.6;
}
.rn-assist-box .realkyc-form { margin-top: 0; }
.rn-assist-box .modal-actions { margin-top: 16px; }
.rn-assist-box .modal-actions .rn-btn { min-width: 96px; }

@media (max-width: 640px) {
  .rn-empty { padding: 18px 14px; }
  .rn-mine { flex-direction: column; align-items: stretch; }
  .rn-group-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* R107 · 找活大厅 */
.hall-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.hall-filters h2 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #374151;
}
.hall-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hall-filter-row select,
.hall-filter-row input {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  min-width: 110px;
}
.hall-filter-row input { min-width: 160px; flex: 1; }
.hall-filter-row select[disabled] { background: #f3f4f6; color: #9ca3af; }
.hall-filter-row select:focus,
.hall-filter-row input:focus { outline: 2px solid #3b82f6; outline-offset: -1px; }
.hall-tip {
  margin: 8px 0 0;
  font-size: 11px;
  color: #6b7280;
}
.btn-primary,
.btn-secondary {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: #ea580c; color: #fff; border-color: #ea580c; }
.btn-primary:hover { background: #c2410c; }
.btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-secondary:hover { background: #f3f4f6; }
/* R161 · 危险按钮(清理空租户 / 删除类操作) */
.btn-danger {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid #dc2626;
  cursor: pointer;
  background: #fef2f2;
  color: #b91c1c;
}
.btn-danger:hover { background: #fee2e2; border-color: #b91c1c; color: #7f1d1d; }

.hall-results h2 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hall-count {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}
.hall-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.hall-card:hover { border-color: #fb923c; }
.hall-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.hall-card-head h3 {
  margin: 0;
  font-size: 15px;
  color: #111827;
}
.hall-salary {
  color: #ea580c;
  font-weight: 600;
  font-size: 15px;
}
.hall-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.hall-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  border-radius: 4px;
}
.hall-tag-region { background: #eff6ff; color: #1d4ed8; }
.hall-tag-cert   { background: #fef3c7; color: #92400e; }
/* R221 · 项目资料标签（工程属性 / 建筑面积） */
.hall-card-profile { margin-top: 2px; }
.hall-tag-eng      { background: #ecfdf5; color: #047857; }
.hall-tag-area     { background: #f5f3ff; color: #6d28d9; }
.hall-req {
  margin: 6px 0;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  background: #fafafa;
  padding: 6px 10px;
  border-radius: 4px;
}
.hall-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

/* =====================================================================
   R108 · 工人端"我的考勤" — 顶部统计 / 月历 / 明细表
   ===================================================================== */

/* 顶部统计卡(6 个) */
.att-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.att-summary-card {
  padding: 10px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.att-summary-card .att-card-num {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}
.att-summary-card .att-card-label {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}
.att-card-att      { border-top: 3px solid #10b981; }
.att-card-ot       { border-top: 3px solid #f59e0b; }
.att-card-hours    { border-top: 3px solid #f97316; }
.att-card-late     { border-top: 3px solid #ef4444; }
.att-card-punctual { border-top: 3px solid #3b82f6; }
.att-card-pay      { border-top: 3px solid #8b5cf6; }

.att-basis {
  font-size: 11px;
  color: #6b7280;
  margin: 4px 2px 16px;
}

/* 月历整体 */
.att-calendar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.att-calendar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 10px;
}
.att-calendar-head h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  min-width: 140px;
  text-align: center;
}
.att-month-nav {
  font-size: 18px;
  color: #3b82f6;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.att-month-nav:hover { background: #eff6ff; }

.att-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.att-weekday {
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  padding: 4px 0;
}
.att-weekday:nth-child(1),
.att-weekday:nth-child(7) { color: #ef4444; }   /* 周末红色 */

.att-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.att-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid transparent;
  background: #f9fafb;
  position: relative;
  transition: transform .1s, box-shadow .1s;
}
.att-cell:hover:not(.att-empty) {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.att-cell.att-empty { background: transparent; }
.att-cell-day {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  line-height: 1;
}
.att-cell-mark {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 600;
  line-height: 1;
}

/* 状态色 */
.att-present { background: #d1fae5; border-color: #6ee7b7; }
.att-present .att-cell-mark { color: #047857; }
.att-late { background: #fed7aa; border-color: #fdba74; }
.att-late .att-cell-mark { color: #c2410c; }
.att-absent { background: #f3f4f6; border-color: #d1d5db; }
.att-absent .att-cell-mark { color: #6b7280; }
.att-pending { background: #fef3c7; border-color: #fcd34d; }
.att-pending .att-cell-mark { color: #92400e; }
.att-rejected { background: #fee2e2; border-color: #fca5a5; }
.att-rejected .att-cell-mark { color: #991b1b; }

.att-today {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}
.att-today .att-cell-day::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #3b82f6;
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: top;
}

/* 图例 */
.att-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
  font-size: 11px;
  color: #6b7280;
}
.att-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.att-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* 明细表 */
.att-table-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.att-table-section h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
}
.att-rec-count {
  font-size: 11px;
  color: #6b7280;
  font-weight: 400;
  margin-left: 8px;
}
.att-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.att-table thead th {
  background: #f9fafb;
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}
.att-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}
.att-table tbody tr:hover {
  background: #fafbfc;
}

/* 状态徽标(沿用 tenant 端 badge-* 设计,统一显示) */
.badge-present { background: #d1fae5; color: #047857; }
.badge-late { background: #fed7aa; color: #c2410c; }
.badge-absent { background: #f3f4f6; color: #6b7280; }

/* 移动端响应:窄屏统计卡变 3 列 */
@media (max-width: 720px) {
  .att-summary { grid-template-columns: repeat(3, 1fr); }
}

/* ===================================================================
   R110 · #/work/jobs  "我的工作 / 工作汇报" 两张卡片
   ★ R302 · .jobs-page-title 已删：页内 h2 与顶栏 pageTitle/crumbs 重复
     （用户反馈：出现多个工作内字样）
   =================================================================== */
/* ★ R302 · jobs-grid 单列：原 1fr 1fr 两列下整页只有一张卡 ⇒ 卡占左半、右半全空
   （用户反馈：内容页不匀称）。单卡场景单列即满宽。 */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.job-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.job-card-head {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}
.job-card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #111827; }
.job-card-count { font-size: 12px; color: #6b7280; }
.job-card-body {
  padding: 12px 16px;
  flex: 1;
  overflow: auto;
  max-height: 70vh;
}

/* 工单列表项 */
.job-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.job-item:last-child { margin-bottom: 0; }
.job-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.job-project { font-weight: 600; color: #1f2937; font-size: 14px; }
.job-author { font-size: 12px; color: #6b7280; }
.job-content {
  color: #374151;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
/* ★ R302 · 去掉每条的「工作内容」小标签后，正文直接顶上来 —— 留出与头部的间距 */
.job-content-main { margin-top: 8px; font-size: 14px; }
.job-tech {
  margin-top: 6px;
  padding: 6px 10px;
  background: #f0f9ff;
  border-left: 3px solid #0ea5e9;
  border-radius: 4px;
  color: #075985;
  font-size: 12px;
  line-height: 1.5;
}
/* R295 · 工作内容展现修正（#/work/jobs + 工作台当前项目卡）：
   #pageMain 挂 .placeholder（P0 占位：text-align:center）⇒ 真实页面整页继承居中；
   组件级显式左对齐 + 「工作内容 / 技术交底」标签独立成行（与 APP 端 jobs.vue 同构） */
.jobs-grid { text-align: left; }
.job-block { margin-top: 8px; text-align: left; }
.job-block:first-child { margin-top: 4px; }
.job-block-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 3px;
  letter-spacing: .5px;
  text-align: left;
}
.job-block-tech .job-block-label { color: #0369a1; }
.wsproj-job { text-align: left; }

/* 汇报表单 */
.report-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.report-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.report-row label { display: flex; flex-direction: column; font-size: 12px; color: #374151; gap: 4px; }
.report-row select, .report-row input[type="date"] {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
.report-content-label { display: flex; flex-direction: column; font-size: 12px; color: #374151; gap: 4px; }
.report-content-label textarea {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
}
.report-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.report-counter { font-size: 11px; color: #6b7280; }
.primary-btn {
  background: #2563eb;
  color: #fff;
  border: 0;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.primary-btn:disabled { background: #9ca3af; cursor: not-allowed; }
.primary-btn:hover:not(:disabled) { background: #1d4ed8; }
.report-msg { margin-top: 8px; font-size: 12px; min-height: 16px; }
.report-msg-ok { color: #059669; }
.report-msg-error { color: #dc2626; }

/* 汇报列表表格 */
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.report-table th, .report-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
}
.report-table th { background: #f9fafb; color: #374151; font-weight: 500; }
.report-content { max-width: 180px; white-space: pre-wrap; word-break: break-word; }
.report-reply { color: #075985; font-size: 11px; }
.report-reply .muted { color: #9ca3af; }
.badge-pending  { background: #fef3c7; color: #92400e; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.badge-confirmed{ background: #dcfce7; color: #166534; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.badge-rejected { background: #fee2e2; color: #991b1b; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

/* ===================================================================
   R111 · #/work/realkyc  工人端"实名认证"(复用 .realkyc-* 样式 + 摘要卡)
   =================================================================== */
.realkyc-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.realkyc-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #f3f4f6;
  font-size: 13px;
}
.realkyc-summary-row:last-child { border-bottom: 0; }
.realkyc-summary-label {
  flex: 0 0 80px;
  color: #6b7280;
}
.realkyc-summary-value {
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.realkyc-summary-meta {
  color: #6b7280;
  font-size: 11px;
  margin-left: 4px;
}
.realkyc-banner {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #075985;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.realkyc-banner-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.realkyc-banner-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.realkyc-audit-log {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}
.realkyc-audit-log .rk-h2 {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}
.realkyc-audit-item {
  padding: 4px 0;
  font-size: 12px;
  color: #374151;
  border-bottom: 1px dashed #f3f4f6;
}
.realkyc-audit-item:last-child { border-bottom: 0; }
.realkyc-audit-comment {
  margin-left: 12px;
  margin-top: 2px;
  color: #6b7280;
  font-size: 11px;
}
.audit-action {
  font-family: monospace;
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* =====================================================================
   R112 · web 端数据面板 (#/stats)
   - 5 个大数字卡片 + 6 个状态分布 + 1 个最近活动表
   ===================================================================== */

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 顶部 5 个大数字卡片 */
.big-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.big-card {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: 0 1px 3px rgba(30,64,175,.15);
}
.big-card:nth-child(2) { background: linear-gradient(135deg, #047857 0%, #10b981 100%); }
.big-card:nth-child(3) { background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%); }
.big-card:nth-child(4) { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); }
.big-card:nth-child(5) { background: linear-gradient(135deg, #be123c 0%, #f43f5e 100%); }
.big-card-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.big-card-label {
  font-size: 14px;
  font-weight: 500;
  opacity: .95;
  margin-bottom: 4px;
}
.big-card-sub {
  font-size: 11px;
  opacity: .85;
  line-height: 1.4;
}

/* 6 个状态分布卡片 + 1 个宽活动表 */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* R292 · 系统页 2×2 均布：dash-grid 3 列放 4 张卡会剩 2/3 空缺 */
.dash-grid.sys-grid { grid-template-columns: repeat(2, 1fr); }
.dash-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.dash-card-wide {
  grid-column: 1 / -1;
}
.dash-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.dash-card-title .right {
  margin-left: auto;
  font-weight: 400;
}

/* 状态条形图 */
.status-bars { display: flex; flex-direction: column; gap: 8px; }
.status-row {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.status-label { color: #374151; }
.status-bar {
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}
.status-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease;
}
.status-count {
  text-align: right;
  color: #1f2937;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 活动表 */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th, .dash-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  text-align: center;
}
.dash-table td.td-left { text-align: left; }
.dash-table th {
  background: #f9fafb;
  color: #6b7280;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .tag {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: monospace;
}
.dash-table .mono { font-family: monospace; font-size: 12px; color: #374151; }
.dash-table .muted { color: #9ca3af; font-size: 12px; }

/* loading / error */
.dashboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: #6b7280;
}
.dashboard-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.placeholder.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

/* 响应式:小屏折行 */
@media (max-width: 1100px) {
  .big-cards { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .big-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid.sys-grid { grid-template-columns: 1fr; }
}

/* =============== R113 · 租户明细 扩展样式 =============== */

/* 全局 muted(原 R112 只在 dash-table 作用域里 .muted) */
.muted { color: #6b7280; font-size: 12px; }
.small { font-size: 11px; }
.td-strong { font-weight: 600; color: #111827; }

/* badge 颜色变体(覆盖默认灰底) */
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-teal   { background: #ccfbf1; color: #115e59; }

/* R174 · 套餐到期 cell(web 端「使用授权」表) */
.expiry-red     { color: #dc2626; font-weight: 600; }
.expiry-orange  { color: #d97706; font-weight: 600; }
.expiry-normal  { color: #4b5563; }

/* R175 · tenant 端套餐到期提醒 banner 基础 + 三态 + CTA 纯文案 */
.plan-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-radius: 8px;
  margin: 16px;
  font-size: 14px;
}
.plan-banner .plan-banner-icon  { font-size: 22px; }
.plan-banner .plan-banner-text  { flex: 1; line-height: 1.55; }
.plan-banner .plan-banner-cta {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: white;
}
.plan-banner .plan-banner-cta-plain {
  background: transparent !important;
  color: inherit !important;
  padding: 8px 0 !important;
  font-weight: 500 !important;
}

/* expired 已过期(红) */
.plan-banner.plan-banner-expired {
  background: linear-gradient(90deg, #fee2e2, #fecaca);
  color: #7f1d1d;
  border: 1px solid #f87171;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}
.plan-banner.plan-banner-expired strong { color: #991b1b; }
.plan-banner.plan-banner-expired .plan-banner-cta { background: #dc2626; }

/* urgent 7 天内(深橙) */
.plan-banner.plan-banner-urgent {
  background: linear-gradient(90deg, #ffedd5, #fed7aa);
  color: #7c2d12;
  border: 1px solid #fb923c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.18);
}
.plan-banner.plan-banner-urgent strong { color: #9a3412; }
.plan-banner.plan-banner-urgent .plan-banner-cta { background: #ea580c; }

/* warning 30 天内(浅橙) */
.plan-banner.plan-banner-warning {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #78350f;
  border: 1px solid #fbbf24;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}
.plan-banner.plan-banner-warning strong { color: #92400e; }
.plan-banner.plan-banner-warning .plan-banner-cta { background: #d97706; }

/* R175 · KPI 卡到期颜色(覆盖默认 .big-card 的中性灰) */
.big-card.kpi-card-expired { border: 2px solid #fca5a5; background: #fef2f2; }
.big-card.kpi-card-expired .big-card-value { color: #b91c1c; }
.big-card.kpi-card-urgent  { border: 2px solid #fdba74; background: #fff7ed; }
.big-card.kpi-card-urgent  .big-card-value { color: #c2410c; }
.big-card.kpi-card-warning { border: 2px solid #fcd34d; background: #fffbeb; }
.big-card.kpi-card-warning .big-card-value { color: #b45309; }
/* ★ R349 · 浅色底 KPI 卡补深色文字：.big-card 基础样式假定深色渐变+白字，
   三个浅底 override 只改了背景 ⇒ label/sub 仍是白字 ⇒ 浅底白字几乎不可见。
   统一改深灰文字（与运营端浅色卡 .kpi-card 一致的可读口径）+ 恢复 opacity。 */
.big-card.kpi-card-expired .big-card-label,
.big-card.kpi-card-urgent  .big-card-label,
.big-card.kpi-card-warning .big-card-label { color: #1f2937; opacity: 1; }
.big-card.kpi-card-expired .big-card-sub,
.big-card.kpi-card-urgent  .big-card-sub,
.big-card.kpi-card-warning .big-card-sub  { color: #52525b; opacity: 1; }


/* 筛选条 */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.filter-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
}
.filter-bar label.grow { flex: 1; min-width: 200px; }
.filter-bar select,
.filter-bar input[type="search"] {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.filter-bar input[type="search"] {
  flex: 1;
}

/* dash-table 数字列对齐 */
.dash-table td.num   { text-align: center; font-variant-numeric: tabular-nums; }
.dash-table td.center { text-align: center; }

/* 让 dash-card-wide 内表格有滚动条(列超长时不出框) */
.dash-card-wide { overflow-x: auto; }

/* R115 · 使用授权按钮 + toast */
.btn-toggle {
  padding: 4px 12px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.btn-toggle:hover { background: #fde68a; }
.btn-toggle.btn-restore {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.btn-toggle.btn-restore:hover { background: #bbf7d0; }

.plan-select {
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

/* R248 · 裸 .toast-success 只属于 Web 管理端右下角 toast（web/app.js toast()）。
   与租户端 .roster-toast.toast-success 同名碰撞：top:80px(roster) + bottom:24px(本规则)
   同时生效 → 盒高被拉满全屏（实名审核驳回反馈窗口过大）⇒ :not(.roster-toast) 隔离 */
.toast-success:not(.roster-toast) {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: #10b981;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  z-index: 9999;
  animation: toast-fade-in 0.2s ease-out;
}
@keyframes toast-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* R116 · 系统运营页 · key-value 行 */
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed #f0f1f3;
  font-size: 13px;
  gap: 12px;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .kv-k {
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
}
.kv-row .kv-v {
  color: #1f2937;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}
.kv-row .kv-v.mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: #4b5563;
}
.kv-row code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: #4b5563;
}

/* R119 · 管理员管理 modal */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-mask[style*="display: flex"],
.modal-mask.show {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  width: 640px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}
.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
}
.modal-close:hover { background: #e2e8f0; color: #ef4444; }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}
.modal-loading .spinner {
  margin: 0 auto 12px;
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-quota {
  padding: 12px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.modal-invite h4,
.modal-list h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: #0f172a;
}
.modal-invite { margin-bottom: 8px; }
.modal-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.modal-form label {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #475569;
}
.modal-form input {
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.modal-form input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.modal-form input:disabled { background: #f1f5f9; color: #94a3b8; }
.modal-form button {
  flex: 0 0 auto;
  padding: 8px 16px;
}
.modal-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.modal-hint.danger { color: #dc2626; }
.admin-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-bottom: 4px;
}
.btn-mini {
  padding: 3px 10px !important;
  font-size: 12px !important;
}

/* R134 · 租户 → 个人资料
   简单卡片 + 2x2 表单 + 提示条 + toast
*/
.profile-section {
  margin: 0 0 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px 22px;
  box-shadow: var(--shadow);
}
.profile-card-head {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 12px; margin-bottom: 16px;
}
.profile-card-title {
  margin: 0; font-size: 15px; font-weight: 600; color: var(--text);
}
.profile-hint { font-size: 12px; color: var(--text-dim); }
.profile-form { display: flex; flex-direction: column; gap: 16px; }
.profile-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-field { display: flex; flex-direction: column; gap: 6px; }
.profile-label { font-size: 13px; color: var(--text-dim); }
.profile-input {
  height: 36px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 14px; color: var(--text);
}
.profile-input:focus { outline: none; border-color: var(--primary); }
.profile-input[readonly] { background: #f8fafc; color: var(--text-dim); }
.profile-tip { font-size: 12px; color: var(--text-dim); }
.profile-actions { display: flex; gap: 12px; padding-top: 4px; }
.profile-actions .primary { padding: 8px 18px; }
.profile-actions .ghost   { padding: 8px 18px; }
.profile-empty-tip {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 0 0; padding: 10px 14px;
  background: #fff7e6; border: 1px solid #ffe7ba; color: #d46b08;
  border-radius: 8px; font-size: 13px;
}
@media (max-width: 720px) {
  .profile-row { grid-template-columns: 1fr; }
}
.profile-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px);
  padding: 10px 18px; background: #1f2937; color: #fff;
  border-radius: 6px; font-size: 13px; z-index: 1000;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.profile-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.profile-toast.success { background: #10b981; }
.profile-toast.error   { background: #ef4444; }

/* R137 · 通用分页器(pager) */
.pager {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; border-top: 1px solid #e5e7eb;
  font-size: 13px; color: #4b5563; flex-wrap: wrap;
}
.pager-info { margin-right: auto; }
.pager-info strong { color: #111827; }
.pager-btn {
  min-width: 32px; height: 32px; padding: 0 10px;
  border: 1px solid #d1d5db; background: #fff; color: #374151;
  border-radius: 6px; font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pager-btn:hover:not(:disabled) {
  background: #f3f4f6; border-color: #9ca3af; color: #111827;
}
.pager-btn:disabled {
  opacity: .45; cursor: not-allowed;
}
.pager-btn.active {
  background: #2563eb; border-color: #2563eb; color: #fff;
  font-weight: 600;
}
.pager-btn.active:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.pager-ellipsis {
  padding: 0 4px; color: #9ca3af; user-select: none;
}
.pager-jump {
  display: inline-flex; align-items: center; gap: 6px;
}
.pager-jump input {
  width: 56px; height: 32px; padding: 0 8px;
  border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; text-align: center; color: #111827;
}
.pager-jump input:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* R138 · 筛选条末尾占位,推出"导出 Excel"到右侧 */
.filter-bar-spacer { flex: 1; }

/* R140 · "下载权限" 三开关 cell（考勤/花名册/工资表） */
.dl-perm-row {
  display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: center;
}
.dl-perm {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 8px; min-width: 50px;
  border: 1px solid #d1d5db; border-radius: 12px;
  background: #f9fafb; color: #6b7280;
  font-size: 12px; font-weight: 500; line-height: 1;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, opacity .15s;
  user-select: none;
}
.dl-perm:hover:not(:disabled) {
  border-color: #9ca3af; color: #111827;
}
.dl-perm:disabled { cursor: wait; opacity: .6; }
.dl-perm.on {
  background: #ecfdf5; border-color: #6ee7b7; color: #047857;
}
.dl-perm.on:hover:not(:disabled) {
  background: #d1fae5; border-color: #34d399;
}
.dl-perm.off {
  background: #fef2f2; border-color: #fca5a5; color: #b91c1c;
}
.dl-perm.off:hover:not(:disabled) {
  background: #fee2e2; border-color: #f87171;
}
.dl-perm.busy { position: relative; }
.dl-perm.busy::after {
  content: ''; width: 10px; height: 10px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; margin-left: 6px; animation: dl-perm-spin 0.8s linear infinite;
}
@keyframes dl-perm-spin { to { transform: rotate(360deg); } }


/* =====================================================================
   P2 · 借支管理 (loans) 视图样式 · R142
   · KPI / 工具栏 / 列表 / 行操作按钮 / 状态徽标 / Modal / Toast
   · tone-* 配色统一贯穿(蓝/中性/橙/绿/紫/红)
   ===================================================================== */

/* KPI 行(4 列)与卡片 */
.kpi-row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.kpi-card  { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
             padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
             position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border, #e5e7eb); }
.kpi-title { font-size: 12px; color: var(--text-dim); letter-spacing: .5px; }
.kpi-value { font-size: 22px; font-weight: 700; color: var(--text); margin: 2px 0; }
.kpi-sub   { font-size: 12px; color: var(--text-dim); }

/* tone-* 配色(贯穿 KPI / status-pill / 行操作按钮) */
.tone-blue     { --tone: #3b82f6; }
.tone-blue::before     { background: #3b82f6 !important; }
.tone-orange   { --tone: #f59e0b; }
.tone-orange::before   { background: #f59e0b !important; }
.tone-green    { --tone: #10b981; }
.tone-green::before    { background: #10b981 !important; }
.tone-purple   { --tone: #a855f7; }
.tone-purple::before   { background: #a855f7 !important; }
.tone-red      { --tone: #ef4444; }
.tone-red::before      { background: #ef4444 !important; }
.tone-neutral  { --tone: #94a3b8; }
.tone-neutral::before  { background: #94a3b8 !important; }

/* 工具栏(下拉 + 搜索) */
.toolbar { display: flex; gap: 12px; align-items: flex-end; margin: 0 0 14px; flex-wrap: wrap; }
.tb-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); }
.tb-field > span { font-weight: 500; }
.tb-field select, .tb-field input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
                                    background: var(--surface); font-size: 13px; min-width: 140px; }
.tb-grow { flex: 1; min-width: 200px; }

/* 数据表 */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
              overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { background: #f8fafc; color: var(--text-dim); font-weight: 600; font-size: 12px; letter-spacing: .5px; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-actions { text-align: right; min-width: 200px; }
.data-table .empty { text-align: center; color: var(--text-dim); padding: 36px 12px; }
.data-table .sub { display: block; color: var(--text-dim); font-size: 11px; margin-top: 2px; }

/* 短单号 */
.short-id { background: #f1f5f9; border: 1px solid var(--border); padding: 1px 6px;
            border-radius: 3px; font-size: 11px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--text-dim); }

/* 状态徽标(借支状态用 tone-* 配色) */
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px;
               font-weight: 500; border: 1px solid var(--tone, var(--border));
               background: color-mix(in srgb, var(--tone, #94a3b8) 10%, transparent);
               color: var(--tone, var(--text-dim)); }

/* ---- R199 · 系统 → 授权管理（租户组授权）专属样式 ---- */
.grant-sub { color: var(--text-dim); font-size: 12px; }
.grant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.grant-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.grant-card-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.grant-card-sub   { color: var(--text-dim); font-size: 12px; }
.grant-card .table-wrap { border: 0; border-radius: 0; }
.grant-card .data-table .col-actions { text-align: right; min-width: 140px; }
.grant-card .data-table .col-actions .row-btn { margin-left: 6px; }
.grant-modal .mf-field select[multiple] { min-height: 110px; }
.grant-modal .mf-field select[multiple] option { padding: 4px 6px; }
.grant-modal .modal-form select,
.grant-modal .modal-form input,
.grant-modal .modal-form textarea { width: 100%; box-sizing: border-box; }
.grant-modal .modal-form .grant-search-btn { width: 100%; }
.grant-hint-inline {
  font-size: 12px; color: var(--text-dim); margin: 0 0 4px;
}
/* R199 · .mf-field 是 display:flex，会盖掉 [hidden] 的 display:none →
   隐藏字段仍占位，把整行挤到右边。故显式覆盖。 */
.grant-modal .mf-field[hidden] { display: none !important; }
/* .mf-full 原本用 grid-column，modal-form 是 flex 布局 → 改为占满整行 */
.grant-modal .mf-full { flex: 1 1 100%; }
/* R199 · 全局 .modal-form 被两处规则定义（7726 / 8032），后者改成 column 方向
   但 align-items:flex-end 仍生效 → 字段全部贴右收缩、左边大片空白。
   这里在 .grant-modal 作用域内重置为「左对齐 + 2 列排布 + 隐藏字段不占位」。 */
.grant-modal .modal-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 14px;
  padding: 18px 20px;
}
.grant-modal .modal-form > label,
.grant-modal .modal-form > .mf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  text-align: left;
  align-self: flex-start;
  flex: 1 1 calc(50% - 7px);
  min-width: 200px;
  max-width: 100%;
  margin: 0;
}
.grant-modal .modal-form > .mf-full,
.grant-modal .modal-form > label.mf-full {
  flex: 1 1 100%;
}
.grant-modal .modal-form > .modal-foot {
  flex: 1 1 100%;
}
.grant-search-btn {
  width: 100%; height: 40px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--primary); font-size: 13px; cursor: pointer;
}
.grant-search-btn:hover { border-color: var(--primary); }

/* 行操作按钮 */
.row-actions { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions-empty { color: var(--text-dim); font-size: 12px; }
.row-btn { padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer;
           border: 1px solid var(--tone, var(--border)); background: var(--surface);
           color: var(--tone, var(--text)); transition: background .15s, opacity .15s; }
.row-btn:hover { background: color-mix(in srgb, var(--tone, #94a3b8) 12%, var(--surface)); }
.row-btn-blue   { --tone: #3b82f6; }
.row-btn-orange { --tone: #f59e0b; }
.row-btn-green  { --tone: #10b981; }
.row-btn-purple { --tone: #a855f7; }
.row-btn-red    { --tone: #ef4444; }

/* Modal */
.modal-card { width: 560px; max-width: 92vw; max-height: 90vh; overflow: auto;
              background: var(--surface); border-radius: 12px; padding: 0; display: flex; flex-direction: column; }
.modal-card-sm { width: 420px; }
.modal-head { padding: 14px 20px; border-bottom: 1px solid var(--border);
              display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.modal-close { background: transparent; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-dim); }
.modal-close:hover { color: var(--text); }
/* ★ R267 · 弹窗表单布局修复（用户截图：新增借支申请弹窗字段全部贴右、左侧大片空白、
   借资原因 placeholder 被截断）：
   全局 .modal-form 有两条规则叠加 —— 8341 段（row 布局 + align-items:flex-end）
   与本段（column 布局）。本段的 flex-direction:column 胜出，但 8341 的
   align-items:flex-end 残留未重置 ⇒ 列向下 align-items 管的是【水平对齐】
   ⇒ 每个 .mf-field 收缩成内容宽并贴右、左侧留白，且 .mf-full 的 grid-column
   在 flex 布局里是无效属性（借资原因不占满整行 ⇒ placeholder 截断）。
   ⇒ 显式重置 align-items:stretch，字段占满整行（列向下所有子项本就应铺满，
   .mf-full 的 grid-column 冗余但无害，不再新增覆盖规则以免影响 grant-modal 的
   同名规则）。grant-modal 自身的 align-items:flex-start 更 specific，不受影响。 */
.modal-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.modal-tip { margin: 0 0 4px; font-size: 13px; color: var(--text-dim); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--border); }

/* 表单字段 */
.mf-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mf-field > span { color: var(--text-dim); font-size: 12px; font-weight: 500; }
.mf-field select, .mf-field input, .mf-field textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); font-size: 13px; font-family: inherit;
}
.mf-field input:focus, .mf-field select:focus, .mf-field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}
.mf-field textarea { resize: vertical; }
.mf-full { grid-column: 1 / -1; }

/* Primary / Ghost 按钮(已有 .primary-btn,这里补 .ghost-btn + .primary-btn-danger) */
.ghost-btn { padding: 8px 14px; border-radius: 6px; font-size: 13px; cursor: pointer;
             border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: background .15s; }
.ghost-btn:hover { background: #f1f5f9; }
.primary-btn-danger { background: #ef4444 !important; }
.primary-btn-danger:hover:not(:disabled) { background: #dc2626 !important; }

/* Toast · R284 ★ 改写：此规则原是裸 .toast（bottom:28px + left:50%），与 8873 行的
   .toast（top:16px + right:16px）同名冲突 —— fixed + height:auto 时 top 与 bottom
   同时生效 ⇒ 盒高被拉满全屏（授权提示框巨框 bug，与 R248 roster-toast 碰撞同类）。
   修法：本规则改名 .loans-toast（loans-summary.js 专属，底部居中视觉不变），
   .toast 只剩 8873 一处定义（顶置右上角 + tone-* 变体）。 */
.loans-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
         padding: 10px 20px; border-radius: 8px; background: #1e293b; color: #fff;
         font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); z-index: 9999;
         animation: loans-toast-in .15s ease; }
.loans-toast-err { background: #b91c1c; }
@keyframes loans-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* salary-meta · 标题栏右侧信息 */
.salary-meta { color: var(--text-dim); font-size: 13px; }


/* =====================================================================
 * R145 · 系统 → 操作日志 (audit)
 *   - .mono / .cell-mute / .code-block / .pager
 *   - .audit-payload-link · 点击展开 JSON
 * ===================================================================== */
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.cell-mute { color: var(--text-dim); font-size: 12px; }
.code-block { background: #f8fafc; border: 1px solid var(--border); border-radius: 6px;
              padding: 12px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
              font-size: 12px; line-height: 1.6; color: #1e293b; max-height: 60vh; overflow: auto; }

/* Pager · 操作日志分页(基础样式,后续 R146 系统设置也会用) */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px;
         border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager-info { color: var(--text-dim); font-size: 12px; margin-right: auto; }
.pager .btn-sm { padding: 6px 10px; font-size: 12px; }
.pager .btn:disabled { opacity: .45; cursor: not-allowed; }

/* audit-payload-link · 操作日志 payload 摘要链接 */
.audit-payload-link { color: #2563eb; text-decoration: underline dotted; font-size: 12px;
                      word-break: break-all; }
.audit-payload-link:hover { color: #1d4ed8; text-decoration: underline; }

/* status-pill · 操作日志动作色块(继承 .status-pill .tone-*) */
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 4px;
               font-size: 11px; font-weight: 500; white-space: nowrap; }
.status-pill.tone-red     { background: #fee2e2; color: #b91c1c; }
.status-pill.tone-blue    { background: #dbeafe; color: #1e40af; }
.status-pill.tone-orange  { background: #ffedd5; color: #9a3412; }
.status-pill.tone-green   { background: #d1fae5; color: #065f46; }
.status-pill.tone-purple  { background: #ede9fe; color: #5b21b6; }
.status-pill.tone-neutral { background: #f1f5f9; color: #475569; }

/* R146 · 系统设置页(settings.js) */
.settings-card { margin-bottom: 16px; }
.settings-card .card-body { padding: 16px 20px; }
.settings-card .card-sub   { color: var(--text-dim); font-size: 12px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px 20px;
}
.form-field {
  display: flex; flex-direction: column; gap: 4px;
}
.form-label {
  font-size: 13px; font-weight: 500; color: var(--text);
}
.form-label em { font-style: normal; color: var(--text-dim); font-weight: 400; font-size: 11px; margin-left: 6px; }
.form-field input {
  padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; background: #fff; color: var(--text);
  transition: border-color .15s;
}
.form-field input:focus {
  outline: none; border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .15);
}
.form-hint { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.settings-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 0; margin-top: 8px;
}

/* toast · 操作反馈(顶置右上角) */
.toast {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  padding: 10px 16px; border-radius: 6px; font-size: 13px;
  background: #1f2937; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15);
  min-width: 200px; max-width: 480px;
  animation: toast-in .2s ease-out;
}
.toast.tone-green  { background: #059669; }
.toast.tone-red    { background: #dc2626; }
.toast.tone-blue   { background: #2563eb; }
.toast.tone-orange { background: #d97706; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   R147.2 · P2 能力总览页(public/p2/index.html)
   · 大字号 hero + 三组卡片网格 · tone-* 系列已存在,这里只补 layout
   ===================================================================== */
.p2-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(99,102,241,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(16,185,129,.08), transparent 60%),
    var(--bg, #f8fafc);
  padding: 32px 40px 60px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text, #0f172a);
}
.p2-container { max-width: 1280px; margin: 0 auto; }
.p2-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.p2-brand { display: flex; align-items: center; gap: 12px; }
.p2-brand .mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff;
  display: grid; place-items: center; font-size: 22px;
}
.p2-brand h1 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; }
.p2-brand small { display: block; color: var(--text-dim, #6b7280); font-size: 12px; margin-top: 2px; }
.p2-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  background: #ecfdf5; color: #047857; border: 1px solid #d1fae5;
}
.p2-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.p2-badge.muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.p2-badge.muted .dot { background: #94a3b8; }

.p2-hero {
  padding: 32px 28px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(6,182,212,.06));
  border: 1px solid var(--border, #e5e7eb);
  margin-bottom: 32px;
}
.p2-hero h2 {
  font-size: 26px; font-weight: 700; margin: 0 0 10px; line-height: 1.35;
}
.p2-hero p { color: var(--text-dim, #6b7280); margin: 0; line-height: 1.7; max-width: 760px; font-size: 14px; }
.p2-hero .stats { display: flex; gap: 36px; margin-top: 22px; flex-wrap: wrap; }
.p2-hero .stat { display: flex; flex-direction: column; }
.p2-hero .stat .v { font-size: 22px; font-weight: 700; line-height: 1.1; }
.p2-hero .stat .l { font-size: 12px; color: var(--text-dim, #6b7280); margin-top: 4px; }

.p2-group { margin-bottom: 28px; }
.p2-group-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.p2-group-head h3 { font-size: 15px; font-weight: 600; margin: 0; }
.p2-group-head .pill {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(99,102,241,.12); color: #4f46e5;
}
.p2-group-head .desc { font-size: 12px; color: var(--text-dim, #6b7280); }

.p2-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.p2-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 16px; border-radius: 12px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.p2-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tone, #6366f1);
}
.p2-card:hover {
  transform: translateY(-2px);
  border-color: var(--tone, #6366f1);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.p2-card .row1 { display: flex; align-items: center; gap: 10px; }
.p2-card .emoji {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(99,102,241,.12); color: var(--tone, #4f46e5);
}
.p2-card.tone-blue  .emoji   { background: rgba(59,130,246,.12);  color: #2563eb; }
.p2-card.tone-blue  { --tone: #3b82f6; }
.p2-card.tone-green .emoji   { background: rgba(16,185,129,.12);  color: #047857; }
.p2-card.tone-green { --tone: #10b981; }
.p2-card.tone-purple .emoji  { background: rgba(168,85,247,.12);  color: #7c3aed; }
.p2-card.tone-purple { --tone: #a855f7; }
.p2-card.tone-orange .emoji  { background: rgba(245,158,11,.14);  color: #c2410c; }
.p2-card.tone-orange { --tone: #f59e0b; }
.p2-card.tone-red   .emoji   { background: rgba(239,68,68,.12);   color: #b91c1c; }
.p2-card.tone-red   { --tone: #ef4444; }
.p2-card.tone-cyan  .emoji   { background: rgba(6,182,212,.12);   color: #0e7490; }
.p2-card.tone-cyan  { --tone: #06b6d4; }
.p2-card .title { font-size: 15px; font-weight: 600; }
.p2-card .r-tag {
  font-size: 10px; color: var(--text-dim, #6b7280);
  padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.04);
  font-weight: 500;
}
.p2-card .desc { font-size: 12.5px; color: var(--text-dim, #6b7280); line-height: 1.6; margin: 2px 0; }
.p2-card .meta {
  display: flex; gap: 10px; margin-top: 4px;
  font-size: 11px; color: var(--text-dim, #9ca3af); flex-wrap: wrap;
}

.p2-banner {
  margin-top: 32px; padding: 16px 20px; border-radius: 12px;
  background: #fffbeb; border: 1px solid #fde68a;
  display: flex; gap: 14px; align-items: flex-start;
}
.p2-banner .ico { font-size: 22px; flex-shrink: 0; }
.p2-banner b { display: block; margin-bottom: 4px; color: #92400e; font-size: 13px; }
.p2-banner p { margin: 0; font-size: 13px; color: #78350f; line-height: 1.65; }
.p2-banner code {
  background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px;
  font-size: 12px; font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.p2-foot {
  margin-top: 40px; padding-top: 20px; border-top: 1px dashed var(--border, #e5e7eb);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-dim, #6b7280);
}
.p2-foot a { color: #4f46e5; text-decoration: none; }
.p2-foot a:hover { text-decoration: underline; }
.p2-foot .left { display: flex; gap: 16px; align-items: center; }

@media (max-width: 640px) {
  .p2-shell { padding: 20px 16px 40px; }
  .p2-hero { padding: 22px 18px; }
  .p2-hero h2 { font-size: 20px; }
  .p2-hero .stats { gap: 20px; }
}

/* =====================================================================
   R147.3 · 云端只读 banner(部署到 workbuddy 静态托管时提示用户去本地登录)
   · host 不是 localhost/127.0.0.1 时自动注入并 hide 登录表单
   ===================================================================== */
.cloud-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 10px;
  background: #fffbeb; border: 1px solid #fde68a;
  color: #78350f; font-size: 13px; line-height: 1.6;
  margin: 0 0 16px;
}
.cloud-banner .ico {
  width: 28px; height: 28px; border-radius: 8px;
  background: #fef3c7; color: #b45309;
  display: grid; place-items: center; font-size: 16px;
  flex-shrink: 0;
}
.cloud-banner b { display: block; color: #92400e; font-size: 13px; margin-bottom: 2px; }
.cloud-banner code {
  background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px;
}
.cloud-banner a { color: #b45309; text-decoration: underline; }
.cloud-banner .ctas { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cloud-banner .ctas a.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 6px; font-size: 12.5px;
  text-decoration: none; font-weight: 500;
  background: #b45309; color: #fff;
}
.cloud-banner .ctas a.btn:hover { background: #92400e; }
.cloud-banner .ctas a.btn.ghost {
  background: transparent; color: #92400e; border: 1px solid #fcd34d;
}

.cloud-disabled form { opacity: .55; pointer-events: none; filter: grayscale(.5); }
.cloud-disabled form .cloud-only-tip { display: block !important; }
.cloud-only-tip { display: none; font-size: 12px; color: #92400e; margin-top: 8px; }


/* =====================================================================
   R165 · 删除租户弹窗(重做 · 流式单列 · 适配所有屏宽)
   设计思路:
   - 全部纵向流式,无 grid 多列,任何屏宽都不会挤
   - section 段落分明(头部 / 租户卡 / 影响清单 / 警示 / 验证)
   - 按钮集中在底部 actions
   ===================================================================== */

/* ---- 弹窗容器(覆盖 R163 .modal 默认 max-width 560) ---- */
/* 关键:必须显式重置 .modal 的 position:fixed + display:flex(row)
   否则内层 box 会被锚到视口左边界 + 子节点横向并排挤压 */
.modal.modal-danger {
  position: relative;          /* 覆盖 .modal 的 fixed,回到父 overlay 的 flex 居中 */
  inset: auto;
  display: flex;               /* 沿用 flex(避免破坏 del-modal-head 的 flex 上下文) */
  flex-direction: column;      /* 关键:覆盖默认 row,让 6 个 section 纵向流式 */
  width: min(560px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 0;                                  /* 段落自己控 padding */
  background: #fff;
  border-top: 4px solid #dc2626;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
}
#delete-tenant-overlay { z-index: 1100; }       /* 防止被其它 modal 盖住 */

/* ---- 头部(图标 + 主标 + 副标)---- */
.del-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #fee2e2;
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}
.del-modal-icon { font-size: 32px; line-height: 1; }
.del-modal-titles { flex: 1; min-width: 0; }
.del-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #991b1b;
  margin: 0;
}
.del-modal-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 3px;
}

/* ---- 段落 ---- */
.del-section {
  padding: 14px 22px;
  border-bottom: 1px solid #f3f4f6;
}
.del-section:last-of-type { border-bottom: 0; }
.del-section-label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.del-total-badge {
  font-size: 11.5px;
  font-weight: 500;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
}
.del-total-badge b {
  color: #dc2626;
  font-weight: 700;
}

/* ---- 租户卡片 ---- */
.del-tenant-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
}
.del-tenant-name {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
  word-break: break-all;
}
.del-tenant-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}
.del-tenant-meta li {
  font-size: 12px;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 6px;
}
.del-tenant-meta li span { color: #9ca3af; min-width: 30px; }
.del-tenant-meta li code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: #e5e7eb;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: #1f2937;
}

/* ---- 影响数据清单(单列流式 · 核心数字醒目)---- */
.del-impact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.del-impact-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  background: #fafafa;
  border: 1px solid #f3f4f6;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
}
.del-impact-list .num {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
  min-width: 36px;
  text-align: right;
}
.del-impact-list .lbl { flex: 1; color: #374151; }
.del-impact-list .lbl i {
  font-style: normal;
  color: #9ca3af;
  font-size: 11.5px;
  margin-left: 4px;
}

/* ---- 删除后果警示块 ---- */
.del-warn-block {
  margin: 0 22px 14px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
}
.del-warn-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}
.del-warn-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #78350f;
}
.del-warn-list li { margin-bottom: 2px; }
.del-warn-list strong { color: #5c0011; }

/* ---- 表单字段(label 在上,控件在下,单列流式)---- */
.del-field { margin-bottom: 12px; }
.del-field:last-child { margin-bottom: 0; }
.del-field label {
  display: block;
  font-size: 12.5px;
  color: #4b5563;
  font-weight: 500;
  margin-bottom: 6px;
}
.del-field label code {
  background: #1f2937;
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 1px;
  font-size: 11px;
}
.del-captcha-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.del-captcha-img {
  flex-shrink: 0;
  width: 130px;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s;
}
.del-captcha-img:hover { border-color: #ea580c; }
.del-captcha-img svg { display: block; width: 100%; height: 100%; }
.del-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
}
.del-input:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, .15);
}
.del-input-mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
}

/* ---- 底部按钮(sticky 避免滚动时藏起来)---- */
.del-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
  border-radius: 0 0 12px 12px;
  position: sticky;        /* R171:modal 内容超过 92vh 时,按钮始终钉在底部可见 */
  bottom: 0;
  z-index: 2;              /* 比滚动内容高,确保不被遮挡 */
  flex-shrink: 0;          /* sticky + flex 时强制不缩,保证按钮不挤压 */
}
.del-btn {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  font-family: inherit;
}
.del-btn-ghost {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}
.del-btn-ghost:hover { background: #f3f4f6; border-color: #9ca3af; }
.del-btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.del-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
}
.del-btn-danger:disabled {
  background: #cbd5e1;        /* 灰底,跟启用态红底对比明显 */
  border-color: #cbd5e1;
  color: #fff;
  opacity: 0.7;
  cursor: not-allowed;
  /* 避免被父级任何 transform/opacity 误继承导致看起来还是红的 */
  filter: grayscale(0.6);
}

/* ---- 窄屏适配(≤ 480px,主要修字号和间距)---- */
@media (max-width: 480px) {
  .modal.modal-danger {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  #delete-tenant-overlay { align-items: stretch; }
  .del-modal-head { padding: 14px 16px 12px; }
  .del-modal-icon { font-size: 26px; }
  .del-modal-title { font-size: 16px; }
  .del-modal-sub { font-size: 11.5px; }
  .del-section { padding: 12px 16px; }
  .del-section-label { font-size: 11px; }
  .del-tenant-meta { grid-template-columns: 1fr; gap: 4px; }
  .del-warn-block { margin: 0 16px 12px; padding: 10px 12px; }
  .del-warn-list { font-size: 11.5px; }
  .del-impact-list li { padding: 6px 10px; font-size: 12px; gap: 8px; }
  .del-impact-list .num { font-size: 16px; min-width: 28px; }
  .del-impact-list .lbl i { display: block; margin: 2px 0 0; font-size: 10.5px; }
  .del-captcha-img { width: 110px; height: 40px; }
  .del-input { height: 40px; font-size: 14px; }
  .del-modal-actions { padding: 12px 16px; }
  .del-btn { padding: 8px 14px; font-size: 13px; }
}


/* =====================================================================
   R215 · 实名登记（项目维度）—— 我的资料页 / 工人端实名向导
   ===================================================================== */

/* 区块小标题 */
.rn-sub-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin: 14px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--primary, #d97706);
  line-height: 1.3;
}

/* 提示条变体 */
.rn-tip.small { padding: 7px 10px; font-size: 12px; margin-bottom: 8px; }
.rn-tip.warn {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left-color: #f59e0b;
  color: #92400e;
}
.rn-tip.err {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #ef4444;
  color: #991b1b;
}
.rn-tip .rn-btn { margin-top: 6px; }

/* 按钮变体 */
.rn-btn.warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.rn-btn.warn:hover { background: #ffedd5; }

/* 我的项目实名登记卡 */
.rn-entry {
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.rn-entry-ok   { border-left-color: #16a34a; background: #f0fdf4; }
.rn-entry-warn { border-left-color: #f59e0b; background: #fffbeb; }
.rn-entry-err  { border-left-color: #ef4444; background: #fef2f2; }
.rn-entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.rn-entry-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.rn-entry-group { font-size: 12px; color: #64748b; }
.rn-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 6px;
}
.rn-entry-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 8px;
}
.rn-entry-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 加入工作组列表 */
.rn-join-list { display: flex; flex-direction: column; gap: 8px; }
.rn-join-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.rn-join-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.rn-join-sub  { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* 表格单元格对齐 */
.rn-td-center { text-align: center; }

/* 角色徽章：未加入 */
.rn-group-role.new {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* 协助录入弹窗（R214 已定义 .rn-assist-box / .rn-assist-tip，此处不重复） */
.rn-assist-box .realkyc-form { margin-top: 0; }

@media (max-width: 640px) {
  .rn-entry-head { gap: 6px; }
  .rn-join-item { flex-direction: column; align-items: stretch; }
}

/* =====================================================================
   R217 · 工人管理（只读聚合） + 员工导入 + 实名审核
   ===================================================================== */

/* ---- 通用：页头备注 / 规则提示条 ---- */
.roster-head-note {
  font-size: 12px;
  color: var(--text-dim, #6b7280);
}
.roster-rule-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.7;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.roster-rule-tip b { font-weight: 700; color: #1d4ed8; }

/* ---- 工人管理 · 待审核引导条（R222：告诉用户「未审核的人去哪了」）---- */
.roster-pending-hint {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.7;
  padding: 10px 14px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.roster-pending-hint[hidden] { display: none; }
.roster-pending-hint .rph-text { flex: 1 1 320px; min-width: 0; }
.roster-pending-hint .rph-text b { font-weight: 700; color: #c2410c; }
.roster-pending-hint .rph-link {
  flex: 0 0 auto;
  color: #c2410c;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #fdba74;
  border-radius: 6px;
  padding: 4px 10px;
  background: #fff;
  white-space: nowrap;
}
.roster-pending-hint .rph-link:hover { background: #ffedd5; }

/* ---- 工人管理 · 项目工人满员提醒条（R260-e：满员按套餐分流提示） ---- */
.roster-quota-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.7;
  padding: 10px 14px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.roster-quota-banner[hidden] { display: none; }
.roster-quota-banner .rq-text { flex: 1 1 320px; min-width: 0; }
.roster-quota-banner .rq-text b { font-weight: 700; color: #b91c1c; }

/* ---- 工人管理 · 4 张可点击统计卡 ---- */
.roster-kpi-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.roster-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.roster-kpi-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #6366f1;
}
.roster-kpi-card:nth-child(2)::before { background: #3b82f6; }
.roster-kpi-card:nth-child(3)::before { background: #10b981; }
.roster-kpi-card:nth-child(4)::before { background: #f59e0b; }
.roster-kpi-card:hover {
  box-shadow: 0 3px 12px rgba(15, 23, 42, .10);
  border-color: #93c5fd;
}
.roster-kpi-card.on {
  border-color: #2563eb;
  background: #f5f9ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.roster-kpi-label { font-size: 12px; color: var(--text-dim, #6b7280); letter-spacing: .3px; }
.roster-kpi-value { font-size: 26px; font-weight: 700; color: var(--text, #111827); line-height: 1.2; }
.roster-kpi-desc  { font-size: 11px; color: #94a3b8; line-height: 1.5; }

/* 本月考勤天数 */
.roster-att { font-weight: 600; }
.roster-att.ok    { color: #059669; }
.roster-att.zero  { color: #b91c1c; }

/* ---- 员工导入 · 步骤条 ---- */
.staff-import-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.staff-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  font-size: 13px;
  color: var(--text-dim, #6b7280);
}
.staff-step .n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.staff-step.done { border-color: #86efac; background: #f0fdf4; color: #166534; }
.staff-step.done .n { background: #10b981; color: #fff; }

/* ---- 员工导入 · 文件信息 / 校验结果 ---- */
.staff-file-info {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 12px;
  font-size: 13px;
  color: #334155;
}
.staff-check-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.staff-check-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sc-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.sc-card .n { font-size: 20px; font-weight: 700; color: #1f2937; }
.sc-card .t { font-size: 11px; color: var(--text-dim, #6b7280); margin-top: 2px; }
.sc-card.ok  { border-color: #86efac; background: #f0fdf4; }
.sc-card.ok .n { color: #15803d; }
.sc-card.bad { border-color: #fecaca; background: #fef2f2; }
.sc-card.bad .n { color: #b91c1c; }
.staff-check-title { font-size: 13px; font-weight: 600; color: #334155; margin: 12px 0 8px; }
.staff-check-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.staff-check-table th, .staff-check-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
}
.staff-check-table th { background: #f1f5f9; color: #475569; font-weight: 600; }
.staff-check-table tr.bad td { background: #fef2f2; }
.staff-check-table td.err { color: #b91c1c; font-weight: 600; }
.staff-check-all-ok {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  color: #166534;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}
.staff-check-bad {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
}
.staff-check-preview { font-size: 12px; color: #475569; line-height: 1.9; }
.staff-check-preview span { color: #94a3b8; }
.staff-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.staff-action-hint { font-size: 13px; color: #334155; flex: 1 1 320px; }

/* ---- 实名审核 · 来源快速分拣 ---- */
/* ---- ★ R240 · 项目接收侧提示条：工人自助发来的实名登记 ---- */
.rn-worker-inbox {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
}
.rn-worker-inbox.is-clear {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.rn-worker-inbox-icon { font-size: 20px; line-height: 1; flex: none; }
.rn-worker-inbox-text {
  flex: 1 1 260px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.6;
}
.rn-worker-inbox.is-clear .rn-worker-inbox-text { color: #166534; }
.rn-worker-inbox-text b { font-size: 15px; }
.rn-worker-inbox-btn {
  flex: none;
  border: 1px solid #d97706;
  background: #f59e0b;
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.rn-worker-inbox-btn:hover { background: #d97706; border-color: #b45309; }

.rn-source-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.rn-source-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rn-source-btn:hover { border-color: #93c5fd; }
.rn-source-btn.on {
  border-color: #2563eb;
  background: #f5f9ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.rn-source-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.rn-source-count { font-size: 20px; font-weight: 700; color: #2563eb; line-height: 1.2; }

/* ---- 实名审核 · 统计行 ---- */
.rn-audit-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.rn-stat {
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 12px;
}
.rn-stat b { color: #0f172a; }
.rn-stat.pending  { background: #fffbeb; color: #92400e; }
.rn-stat.pending b { color: #b45309; }
.rn-stat.approved { background: #f0fdf4; color: #166534; }
.rn-stat.approved b { color: #15803d; }
.rn-stat.rejected { background: #fef2f2; color: #991b1b; }
.rn-stat.rejected b { color: #b91c1c; }
.rn-stat.expired  { background: #f1f5f9; color: #475569; }

/* ---- 实名审核 · 来源标签 / 审核徽标 / 操作按钮 ---- */
.rn-src-tag {
  display: inline-block;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.rn-src-tag.import { background: #ede9fe; color: #6d28d9; }
.rn-src-tag.admin  { background: #dbeafe; color: #1d4ed8; }
.rn-src-tag.worker { background: #dcfce7; color: #15803d; }
.rn-audit-badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.rn-audit-badge.pending  { background: #fffbeb; color: #b45309; }
.rn-audit-badge.approved { background: #f0fdf4; color: #15803d; }
.rn-audit-badge.rejected { background: #fef2f2; color: #b91c1c; }
.rn-audit-badge.expired  { background: #f1f5f9; color: #475569; }
.rn-revert-hint { font-size: 10px; color: #b91c1c; margin-top: 3px; }
.rn-audit-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  padding: 3px 10px;
  margin: 0 3px;
  cursor: pointer;
  font-family: inherit;
}
.rn-audit-btn.pass   { background: #10b981; color: #fff; }
.rn-audit-btn.pass:hover { background: #059669; }
.rn-audit-btn.reject { background: #ef4444; color: #fff; }
.rn-audit-btn.reject:hover { background: #dc2626; }

/* ---- 窄屏 ---- */
@media (max-width: 900px) {
  .roster-kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rn-source-bar    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-check-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   R217 · 工人端：找活大厅去引导 + 按名称加入工作组
   ===================================================================== */
.hall-tip-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.8;
  padding: 10px 14px;
  margin: 0 0 12px;
}
.hall-tip-info b { color: #1d4ed8; }

/* 按名称加入工作组的输入行 */
.rn-join-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.rn-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #111827;
}
.rn-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

/* =====================================================================
   R217 · 实名审核表格（独立列宽，避免继承 .roster-table 的 min-width:1400px
        导致「审核状态 / 操作」两列被挤出可视区）
   9 列：序号 姓名 电话 身份证 班组 资料来源 所属项目 审核状态 操作
   合计 100%：5 + 10 + 13 + 17 + 8 + 15 + 16 + 9 + 7
   ===================================================================== */
/* ★ .roster-skel-wrap 是 overflow:hidden（会裁掉右侧列且无法滚动），
   实名审核表用独立容器：窄屏可横向滚动，宽屏全列可见 */
.rn-table-wrap {
  position: relative;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 8px);
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}
.rn-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.rn-table-wrap::-webkit-scrollbar-track { background: transparent; }
.rn-table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.rn-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.rn-table col.c-no     { width: 5%;  }
.rn-table col.c-name   { width: 9%;  }
.rn-table col.c-phone  { width: 12%; }
.rn-table col.c-id     { width: 16%; }
.rn-table col.c-team   { width: 7%;  }
.rn-table col.c-src    { width: 14%; }
.rn-table col.c-proj   { width: 15%; }
.rn-table col.c-st     { width: 10%; }
.rn-table col.c-act    { width: 12%; }
.rn-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 9px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  white-space: nowrap;
}
.rn-table tbody td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 8px;
  color: #111827;
  vertical-align: middle;
}
.rn-table tbody tr:last-child td { border-bottom: 0; }
.rn-table tbody tr:hover { background: #f8fafc; }
.rn-table td.col-center { text-align: center; }
.rn-table td.col-left   { text-align: left; }
.rn-table .rn-cell-ell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =====================================================================
   R217 · 工人管理只读明细表（13 列）
   ★ .roster-skel-wrap 是 overflow:hidden → 右侧「所属项目 / 本月考勤」被裁掉
     且无法滚动；此处改用 .roster-table-scroll（overflow:auto，可横向滚动）
   ★ 13 列平均分会把身份证/银行卡/住址挤扁，这里逐列定宽（合计 100%）
   ===================================================================== */
/* ★ R219 · 14 列（「审核状态」紧跟姓名，合计 100%）—— min-width 收到 1240px，
   让 1080~1360px 的常见屏宽能一屏看全，不用横向滚动去找审核状态 */
.roster-table.rm-table { min-width: 1240px; }
.rm-table col.c-no     { width: 3%;  }
.rm-table col.c-name   { width: 6%;  }
.rm-table col.c-st     { width: 6%;  }
.rm-table col.c-age    { width: 3%;  }
.rm-table col.c-phone  { width: 9%;  }
.rm-table col.c-id     { width: 13%; }
.rm-table col.c-bank   { width: 10%; }
.rm-table col.c-bankn  { width: 8%;  }
.rm-table col.c-home   { width: 12%; }
.rm-table col.c-team   { width: 5%;  }
.rm-table col.c-job    { width: 4%;  }
.rm-table col.c-joined { width: 7%;  }
.rm-table col.c-proj   { width: 10%; }
.rm-table col.c-att    { width: 4%;  }
.rm-table tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================================================================
   R218 · 页头右上角操作区 + 实名审核「状态快速分拣」按钮
   ---------------------------------------------------------------------
   1) .page-head-actions —— 页头右侧的操作容器（备注 + 按钮）
   2) .head-btn / .head-btn-revert —— 「一键批量打回审核」
   3) .rn-status-bar / .rn-status-btn —— 原只读统计条改成可点击分拣按钮
   ===================================================================== */
.page-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-head-actions .roster-head-note { white-space: nowrap; }

.head-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.head-btn:hover { border-color: #fca5a5; background: #fef2f2; }
.head-btn:disabled { opacity: .55; cursor: not-allowed; }
.head-btn-revert {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}
.head-btn-revert:hover { background: #fee2e2; border-color: #ef4444; }

/* ---- 实名审核 · 状态快速分拣（原「共 N 条 / 待审核 / …」只读统计条） ---- */
.rn-status-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.rn-status-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.rn-status-btn:hover { border-color: #cbd5e1; }
.rn-status-btn.on {
  border-color: #2563eb;
  background: #f5f9ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.rn-status-name { font-size: 12px; font-weight: 600; color: #475569; }
.rn-status-btn.on .rn-status-name { color: #1d4ed8; }
.rn-status-count { font-size: 18px; font-weight: 700; line-height: 1.2; color: #0f172a; }
.rn-status-btn.st-pending  .rn-status-count { color: #b45309; }
.rn-status-btn.st-approved .rn-status-count { color: #059669; }
.rn-status-btn.st-rejected .rn-status-count { color: #b91c1c; }
.rn-status-btn.st-expired  .rn-status-count { color: #64748b; }
/* ★ R222 · 「超时未审核」（超过 2 个工作日）——橙色警示 */
.rn-status-btn.st-overdue  .rn-status-count { color: #ea580c; }
.rn-status-btn.st-overdue.on { border-color: #ea580c; background: #fff7ed; box-shadow: 0 0 0 2px rgba(234, 88, 12, .12); }
.rn-status-btn.st-overdue.on .rn-status-name { color: #c2410c; }

/* =====================================================================
   R222 · 工人管理 · 筛选行「一键批量打回」按钮（放在【搜索】后面）
   口径：只对「本月未考勤人数」视图生效
   ===================================================================== */
.roster-revert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.roster-revert-btn:hover:not(:disabled) { background: #fee2e2; border-color: #ef4444; }
.roster-revert-btn:disabled { opacity: .5; cursor: not-allowed; }
.roster-revert-btn[hidden] { display: none; }

/* =====================================================================
   R223 · 实名审核 · 一键批量审核通过（只对「花名册人员资料」分拣显示）
   ===================================================================== */
.rn-bulk-approve-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #15803d;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.rn-bulk-approve-btn:hover:not(:disabled) { background: #dcfce7; border-color: #22c55e; }
.rn-bulk-approve-btn:disabled { opacity: .5; cursor: not-allowed; }
.rn-bulk-approve-btn[hidden] { display: none; }

/* =====================================================================
   R222 · 工人端 · 缺勤补勤申请弹窗
   ===================================================================== */
.rn-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 16px;
}
.rn-modal {
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .25);
}
.rn-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.rn-modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.rn-modal-x {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
}
.rn-modal-body { padding: 14px 16px; }
.rn-modal-tip {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}
.rn-field { display: block; margin-bottom: 12px; }
.rn-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.rn-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.rn-input:focus { outline: none; border-color: var(--primary); }
.rn-modal-err {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
  font-size: 12px;
}
.rn-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.rn-btn {
  height: 34px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.rn-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.rn-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 日期多选网格 */
.mk-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.mk-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.mk-day input { display: none; }
.mk-day:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* 考勤页「缺勤补勤申请」按钮 */
.att-makeup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
}
.att-makeup-btn:hover { background: #dbeafe; border-color: #60a5fa; }

/* =====================================================================
   R222 · 工人端 · 审核提醒条（未审核 / 超时未审核）
   ===================================================================== */
.worker-audit-reminder {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 13px;
  line-height: 1.6;
}
.worker-audit-reminder.is-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.worker-audit-reminder.is-overdue {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.war-ico { font-size: 16px; line-height: 1.4; flex: 0 0 auto; }
.war-body { flex: 1; min-width: 0; }
.war-text { font-weight: 500; }
.war-sub { margin-top: 2px; font-size: 12px; opacity: .85; }
.war-btn {
  flex: 0 0 auto;
  align-self: center;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid #fdba74;
  background: #fff;
  color: #c2410c;
  cursor: pointer;
}
.war-btn:hover:not(:disabled) { background: #ffedd5; }
.war-btn:disabled { opacity: .5; cursor: not-allowed; }

/* =====================================================================
   R222 · 实名审核 · 行内标记（超时未审核 / 工人已申请）
   ===================================================================== */
.rn-table .rn-overdue-hint {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
  color: #c2410c;
  white-space: nowrap;
}
.rn-table .rn-worker-req-hint {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .rn-status-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-head { flex-wrap: wrap; }
  .page-head-actions { width: 100%; justify-content: flex-start; }
}


/* =====================================================================
   R219 · 工人管理 · 「审核状态」列徽标
   （「本月未考勤」视图会显示被系统自动打回的人，标注出来避免误解）
   ===================================================================== */
.rm-table .rn-audit-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
}
.rm-table .rn-audit-badge.approved { background: #dcfce7; color: #15803d; }
.rm-table .rn-audit-badge.pending  { background: #fef3c7; color: #b45309; }
.rm-table .rn-audit-badge.rejected { background: #fee2e2; color: #b91c1c; }
.rm-table .rn-audit-badge.expired  { background: #e2e8f0; color: #475569; }
.rm-table .rn-revert-hint {
  display: block;
  font-size: 10px;
  color: #b91c1c;
  margin-top: 2px;
}


/* =====================================================================
   R231 · 工作汇总（运营 → 工作布置 → 工作汇总）
   工人端提交的「工作汇报」在租户端的汇总页：列表 + 详情弹窗 + 回复处理
   ===================================================================== */

/* ---- 详情弹窗 ---- */
.wr-modal-box { width: 680px; }
.wr-modal-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 6px;
}
.wr-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.wr-detail-row {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.wr-detail-row:last-child { border-bottom: 0; }
.wr-detail-k {
  flex: 0 0 84px;
  color: var(--text-dim);
  font-weight: 600;
}
.wr-detail-v { flex: 1; color: var(--text); word-break: break-all; }
.wr-detail-content { display: block; }
.wr-detail-content .wr-detail-k { display: block; margin-bottom: 4px; }
.wr-detail-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px 12px;
}
.wr-detail-time { color: var(--text-dim); font-size: 12px; }

/* ---- 回复区 ---- */
.wr-reply-box {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}
.wr-reply-label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.wr-reply-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  color: var(--text);
  background: #fff;
}
.wr-reply-input:focus {
  outline: none;
  border-color: var(--primary);
}
.wr-reply-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.wr-reply-count {
  flex: 1;
  font-size: 12px;
  color: var(--text-dim);
}
.wr-reply-back {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dim);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.wr-reply-back:hover:not(:disabled) { border-color: #94a3b8; color: var(--text); }
.wr-reply-back:disabled { opacity: .5; cursor: not-allowed; }


/* =====================================================================
   R232 · 工资台账全显 / 借资管理 / 借资审核
   ===================================================================== */

/* ---- 工资台账：全显模式（多一列「所属项目」） ---- */
.salary-table.salary-all col.c-name    { width: 7%;  }
.salary-table.salary-all col.c-project { width: 10%; }
.salary-table.salary-all col.c-id      { width: 11%; }
.salary-table.salary-all col.c-bank    { width: 11%; }
.salary-table.salary-all col.c-phone   { width: 8%;  }
.salary-table.salary-all col.c-rate    { width: 9%;  }
.salary-table.salary-all col.c-att     { width: 6%;  }
.salary-table.salary-all col.c-ot      { width: 6%;  }
.salary-table.salary-all col.c-gross   { width: 10%; }
.salary-table.salary-all col.c-deduct  { width: 11%; }
.salary-table.salary-all col.c-net     { width: 11%; }

/* ---- 借资管理：KPI 三组统计 ---- */
.lp-kpi-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.lp-kpi-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 14px;
  background: #fff;
}
.lp-kpi-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: .5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.lp-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lp-kpi-mini {
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  min-width: 0;
}
.lp-kpi-mini.tone-blue   { border-left-color: #3b82f6; }
.lp-kpi-mini.tone-green  { border-left-color: #22c55e; }
.lp-kpi-mini.tone-red    { border-left-color: #ef4444; }
.lp-kpi-mini.tone-neutral{ border-left-color: #94a3b8; }
.lp-kpi-mini.tone-orange { border-left-color: #f59e0b; }
.lp-kpi-label {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-kpi-body {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lp-kpi-main {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-kpi-sub {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 借资管理：申请人聚合 + 明细展开 ---- */
.lp-table { width: 100%; }
.lp-applicant-row { cursor: pointer; }
.lp-applicant-row:hover > td { background: #f8fafc; }
.lp-applicant-row.open > td { background: #eff6ff; font-weight: 500; }
.lp-detail-wrap > td {
  padding: 0 !important;
  background: #fbfdff;
  border-top: 1px dashed var(--border);
  border-bottom: 1px solid var(--border);
}
.lp-detail-table {
  width: 100%;
  font-size: 12px;
}
.lp-detail-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--text-dim);
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.lp-detail-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.lp-detail-table tbody tr:last-child td { border-bottom: 0; }
.lp-detail-table .rn-cell-ell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 借资审核：批量驳回按钮 ---- */
.rn-bulk-reject-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #dc2626;
  cursor: pointer;
}
.rn-bulk-reject-btn:hover:not(:disabled) { background: #fee2e2; border-color: #ef4444; }
.rn-bulk-reject-btn:disabled { opacity: .5; cursor: not-allowed; }
.rn-bulk-reject-btn[hidden] { display: none; }

/* ---- 响应式：窄屏时 KPI 三组竖排 ---- */
@media (max-width: 1180px) {
  .lp-kpi-wrap { grid-template-columns: 1fr; }
}

/* =====================================================================
   R232 · 工人端「我的预结算工资」
   ===================================================================== */
.ws-section { margin-bottom: 16px; }
.ws-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.ws-kpi {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  min-width: 0;
}
.ws-kpi-label { font-size: 11px; color: var(--text-dim); }
.ws-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-kpi.is-main .ws-kpi-value { color: #059669; }
.ws-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.ws-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
}
.ws-group-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-group-sum { font-size: 12px; color: var(--text-dim); font-weight: 500; white-space: nowrap; }
.ws-table { width: 100%; font-size: 12px; }
.ws-table th {
  background: #fbfdff;
  font-weight: 600;
  color: var(--text-dim);
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ws-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ws-table tbody tr:last-child td { border-bottom: 0; }
.ws-num { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ws-money { color: #059669; font-weight: 600; }
@media (max-width: 720px) {
  .ws-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ★ R233 · 操作日志 · 范围提示条（租户端：本工作组 / web 端：全站） */
.audit-scope-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 16px; padding: 10px 14px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
  color: #1e40af; font-size: 13px; line-height: 1.6;
}
.audit-scope-note b { font-weight: 700; }
.audit-scope-dot {
  flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%;
  background: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}

/* ★ R233 · 操作日志 KPI 行列数变体（租户端 5 卡 / web 端 6 卡，避免 4+1 断行） */
.kpi-row.kpi-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-row.kpi-row-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) {
  .kpi-row.kpi-row-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-row.kpi-row-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .kpi-row.kpi-row-5, .kpi-row.kpi-row-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   ★ R237 · 工人端「我的工作台」+「考勤打卡」+「工作汇报」+「借资申请」
   ===================================================================== */

/* --- 工作台：GPS 条 --- */
.ws-gps {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border-left: 4px solid #94a3b8;
  border-radius: 10px; padding: 10px 14px; margin: 10px 0 4px;
}
.ws-gps.is-in { border-left-color: #16a34a; background: #f0fdf4; }
.ws-gps.is-out { border-left-color: #f59e0b; background: #fffbeb; }
.ws-gps-ico { font-size: 20px; }
.ws-gps-t { font-size: 13px; font-weight: 700; color: #0f172a; }
.ws-gps-s { font-size: 12px; color: #64748b; margin-top: 2px; }

/* --- 工作台：五模块 --- */
.ws-mods {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
}
.ws-mod {
  display: flex; flex-direction: column; gap: 4px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid #b45309;
  border-radius: 10px; padding: 12px 14px; text-decoration: none; color: inherit;
}
.ws-mod:hover { background: #fffbeb; }
.ws-mod-off { opacity: .55; border-left-color: #cbd5e1; cursor: not-allowed; }
.ws-mod-ico { font-size: 22px; }
.ws-mod-lbl { font-size: 14px; font-weight: 700; color: #0f172a; }
.ws-mod-desc { font-size: 11px; color: #64748b; line-height: 1.5; }

/* --- 工作台 / 我的资料：工作组分组 --- */
.ws-group {
  border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; background: #fff;
}
.ws-group-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed #e2e8f0; margin-bottom: 8px;
}
.ws-group-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.ws-group-link { color: #b45309; text-decoration: none; }
.ws-group-link:hover { text-decoration: underline; }
.ws-group-meta { font-size: 12px; color: #94a3b8; }
.ws-item { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.ws-item:last-child { border-bottom: 0; }
.ws-item-on { background: #fffbeb; border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.ws-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-item-name { font-size: 13px; font-weight: 600; color: #334155; text-decoration: none; }
.ws-item-link { color: #334155; }
.ws-item-link:hover { color: #b45309; text-decoration: underline; }
.ws-item-val { font-size: 13px; font-weight: 700; color: #16a34a; }
.ws-item-meta { font-size: 11px; color: #94a3b8; margin-top: 3px; line-height: 1.5; }
.ws-item-act { margin-top: 6px; }
.ws-makeup-btn {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: #b45309; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 999px; padding: 4px 12px; text-decoration: none;
}
.ws-makeup-btn:hover { background: #fef3c7; }
.ws-badge { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 10px; }
.ws-badge.approved { background: #f0fdf4; color: #16a34a; }
.ws-badge.pending { background: #fffbeb; color: #b45309; }
.ws-badge.rejected { background: #fef2f2; color: #dc2626; }

/* --- 工作台：打卡 --- */
.ws-checkin-state {
  display: inline-block; font-size: 13px; font-weight: 700;
  border-radius: 999px; padding: 5px 14px; margin: 10px 0;
}
.ws-checkin-state.is-todo { background: #fffbeb; color: #b45309; }
.ws-checkin-state.is-pending { background: #eff6ff; color: #2563eb; }
.ws-checkin-state.is-done { background: #f0fdf4; color: #16a34a; }
.ws-checkin-actions { display: flex; gap: 10px; margin-top: 12px; }
.ws-btn {
  font-size: 13px; font-weight: 600; padding: 9px 20px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
}
.ws-btn.primary { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.ws-btn.ghost { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.ws-btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- 工作汇报 / 借资：表单补充 --- */
.report-label { display: block; font-size: 13px; color: #475569; margin: 10px 0; }
.report-label textarea,
.report-label select,
.report-label input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 5px;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; color: #0f172a; font-family: inherit; background: #fff;
}
@media (max-width: 720px) {
  .ws-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* ★ R253 · 窄屏「请选择项目」卡片单列，避免两列挤压（项目名换行难看） */
  .ws-picker-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   R245 · 实名登记弹窗「展示不全、无法提交」
   ---------------------------------------------------------------------
   根因（三重叠加，全部来自 CSS 覆盖顺序）：
   ① .modal-box(R119 追加，位于文件后部) 的 `overflow:hidden` 覆盖了
      .rn-assist-box(R214，较早) 的 `overflow:auto`
      ⇒ 内容超出 max-height 被**直接裁掉**，且**没有任何可滚动容器**
      ⇒ 底部「住址/薪资标准/证件上传/提交审核」永远够不着
   ② .modal-box 是 content-box ⇒ `max-height` 只约束内容区，
      外加 `padding:22px 24px` ⇒ 弹窗**外框比 max-height 高 44px**
      ⇒ 居中后上下溢出视口（顶部被切）
   ③ .modal-box 的 `width:640px` 覆盖了 .rn-assist-box 的 `width:min(760px,94vw)`
      ⇒ 弹窗偏窄，字段被挤

   修法：用更高优先级的 `.modal-box.rn-assist-box` 明确覆盖，
        语义 = 「整弹窗自身滚动」（而不是 R119 的 head/body/foot 三段式）
   ===================================================================== */
.modal-box.rn-assist-box {
  /* ★ R119 的 .modal-box 是「head/body/foot 三段式」语义（display:flex + overflow:hidden）；
     本弹窗是「整块滚动」语义 ⇒ 改回 block，否则 flex item 不收缩 ⇒ 滚不动 */
  display: block;
  box-sizing: border-box;
  width: min(760px, 94vw);
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
/* ★ 标题行吸顶：表单很长，滚下去后仍能看见标题并点 × 关闭 */
.rn-assist-head {
  position: sticky;
  top: -22px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -22px -24px 10px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.rn-assist-head h3 { margin: 0; }
/* 小屏：留出更多滚动空间 + 收紧字段间距，避免一屏只能看 4 行 */
@media (max-width: 640px) {
  .modal-box.rn-assist-box { max-height: calc(100vh - 24px); padding: 16px 14px; }
  .modal-box.rn-assist-box .realkyc-grid { gap: 12px 12px; margin-bottom: 16px; }
  .modal-box.rn-assist-box .realkyc-input { padding: 8px 10px; }
  .rn-assist-head {
    top: -16px;
    margin: -16px -14px 10px;
    padding: 12px 14px;
  }
}

/* ★ 提交按钮：吸底常驻（表单很长，滚动到底才找得到按钮太反直觉）。
     注意：只在「弹窗内容可滚动」时才用 sticky，否则会盖住内容。 */
.modal-box.rn-assist-box .realkyc-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 16px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 32%, #fff 100%);
}
/* ★★ R246 · 吸底按钮条已**外置**为 .realkyc-footer（三段式）⇒ 这里不再需要占位补偿。
   （保留本规则仅作兜底：若某处仍是「表单内 sticky」结构，至少不会被压住。
     ★ 用直接子级限定 ⇒ 弹窗内 form（在 .realkyc-scroll 里）不会被误加 68px 空白。） */
.modal-box.rn-assist-box > .realkyc-form:not(.realkyc-form-scroll) {
  padding-bottom: var(--rn-actions-h, 68px);
}

/* ★★★ R246 · **弹窗三段式布局**（根治遮挡）
   结构：.rn-assist-box(flex column)
           ├ .rn-assist-head     固定（标题 + ×）
           ├ .realkyc-scroll     **唯一滚动区**（brand + tip + form）
           └ .realkyc-footer    固定（按钮条）
   ⇒ ① 按钮条**不浮在内容上** ⇒ 任何滚动位置都不会压住输入框
     ② 按钮条**永远在弹窗底部** ⇒ 横屏/矮屏也点得到
     ③ 标题永远可见 ⇒ 随时能点 × 关闭
   ★★ R246-b · 滚动区是 **wrapper**（不是 form 本身）：
     若滚动区 = form，而 brand/tip 是弹窗直层的 flex:0 0 auto 块
     ⇒ 矮视口（横屏，可见区仅 ~346px）时 head+brand+tip 把 form 挤成 **高度 0**
     ⇒ 表单字段与按钮条**整体消失**（真机：横屏只剩一段说明文字）
     ⇒ 修法：brand/tip 一并放进滚动容器，弹窗直层只剩 head/scroll/footer 三段 */
.modal-box.rn-assist-box {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.modal-box.rn-assist-box .rn-assist-head {
  flex: 0 0 auto;
  position: static;              /* 不再需要 sticky（本身就不滚） */
  margin: 0;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
/* ★ 表单内容区：唯一滚动容器 */
.modal-box.rn-assist-box .realkyc-form-scroll {
  flex: 1 1 auto;
  min-height: 0;                 /* ★ flex item 默认 min-height:auto ⇒ 不会收缩 ⇒ 撑破弹窗 */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 18px 24px 20px;
  /* ★ brand / tip 也在滚动区内（form 的前一个兄弟）⇒ 这里给它们留边距 */
  margin: 0;
}
/* ★ 说明块在滚动区**内**（不再是弹窗直层的固定块）⇒ 矮视口时可随内容一起滚走 */
.modal-box.rn-assist-box .realkyc-scroll > .realkyc-brand,
.modal-box.rn-assist-box .realkyc-scroll > .rn-assist-tip {
  margin: 0 0 14px;
}
.modal-box.rn-assist-box .realkyc-scroll > .rn-assist-tip:last-child {
  margin-bottom: 0;
}
/* ★ 底部按钮条：固定，不再 sticky */
.modal-box.rn-assist-box .realkyc-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 12px 24px 14px;
}
.modal-box.rn-assist-box .realkyc-footer .realkyc-actions {
  position: static;              /* ★ 不再 sticky（已是独立 footer） */
  margin: 0;
  padding: 0;
  background: none;
}
.modal-box.rn-assist-box .realkyc-actions .realkyc-btn-primary { min-width: 132px; }

/* =====================================================================
   ★ R246 · 弹窗「真实可见区」自适应（移动端 100vh 陷阱）

   ★ 现象（用户截图实证）：
     「员工自助实名登记窗口展示不全,无法提交」
     ⇒ 弹窗底部（住址 / 薪资标准 / 证件上传 / 提交审核按钮）落在屏幕可视区之外。

   ★ 根因：移动端浏览器的 `100vh` **包含地址栏/工具栏**，
     比 `visualViewport.height`（真实可见高度）大 40~120px
     ⇒ `max-height: calc(100vh - 32px)` 算出的弹窗**比屏幕还高**
     ⇒ 内容能滚，但**吸底按钮也跟着在屏幕外**（sticky 相对滚动容器，容器超屏 ⇒ 按钮超屏）
     ⇒ 用户看到的就是「展示不全 + 找不到提交按钮」。

   ★ 修法（两道保险）：
     A. **JS 实测**（主）：`shared/realkyc-form.mjs` 的 `fitModalToViewport()`
        用 visualViewport.height 算高度并写**内联样式**（优先级最高 ⇒ CSS 旧了也生效）
     B. **CSS 兜底**（辅）：max-height 优先用 `dvh`（动态视口高度，自动扣地址栏），
        `vh` 作为回退（老浏览器）
   ===================================================================== */
@supports (height: 100dvh) {
  .modal-box.rn-assist-box {
    max-height: calc(100dvh - 32px);
  }
  @media (max-width: 640px) {
    .modal-box.rn-assist-box { max-height: calc(100dvh - 24px); }
  }
}
/* ★ 弹窗根容器：整块不超可见区 + 内容垂直居中；overflow:hidden 防止内层再溢出 */
.modal.rn-assist-modal {
  overflow: hidden;
  padding: 12px;
  box-sizing: border-box;
}
/* ★ 移动端：按钮条**始终可见**（不用等滚到底）
   —— 因为手机屏幕矮，滚动才找按钮太反直觉。
   用 sticky + 容器不超屏 ⇒ 按钮恒在可视区底部。 */
@media (max-width: 760px) {
  .modal-box.rn-assist-box {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }
  .modal-box.rn-assist-box .realkyc-actions {
    padding: 10px 0 2px;
    margin-top: 12px;
  }
  .modal-box.rn-assist-box .realkyc-actions .realkyc-btn-primary { min-width: 108px; }
}
/* ★★ R246 · **窄屏单列**：390px 宽下两列各只剩 ~180px
   ⇒ 「银行卡号」「12 位联行号 / 不知道可空」这类长占位文案被挤没、输入框极窄。
   修法：≤480px 改**单列**（字段上下排），宽度给足 ⇒ 每个字段都完整可用。
   ★ 只改**布局**，不改字段集合与顺序（两端仍同源）。 */
@media (max-width: 480px) {
  .modal-box.rn-assist-box .realkyc-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .modal-box.rn-assist-box .realkyc-col-2 {
    grid-column: span 1;
  }
}


/* =====================================================================
   ★ R252 · 工作台「当前项目」区块
   ---------------------------------------------------------------------
   用户原话：「当员工从我的资料我的工作组项目，点击进入工作台时，
     系统调取该项目对应的 api 写入，考勤打卡、缺勤补勤、工作汇报、借资申请，
     和读取工作内容，到工作台。」
   ⇒ 工作台绑定当前项目后，5 块内容就地呈现（读 1 + 写 4）。
   ===================================================================== */
.wsproj-section { margin-bottom: 16px; }
.wsproj-meta {
  font-size: 13px;
  color: #64748b;
  margin: -6px 0 12px;
}

/* =====================================================================
   ★ R253 · 「请选择项目」引导（删除「工作台首页」入口后的 fail-closed 出口）
   背景：工作台已「按项目运转」（我的资料 → 我的工作组 → 项目）。
        若无 projectId 进入（手敲 URL / 旧书签），不再静默兜底到「第一个在岗项目」，
        改为让工人显式选择一个项目，避免跨项目误写。
   ===================================================================== */
.ws-picker-section { margin-bottom: 16px; }
.ws-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 8px;
}
.ws-picker-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #b45309;
  border-radius: 12px;
  background: #fffbeb;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.ws-picker-card:hover {
  border-color: #b45309;
  box-shadow: 0 2px 8px rgba(180, 83, 9, .12);
}
.ws-picker-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}
.ws-picker-meta {
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
  word-break: break-all;
}
.wsproj-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wsproj-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}
.wsproj-card-wide { grid-column: 1 / -1; }
/* ★ R254 · focus=checkin：考勤打卡卡片高亮（进入工作台即落到打卡） */
.wsproj-card.ws-focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, .18);
  background: #fffbeb;
}
.ws-focus-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.ws-focus-tip {
  background: #fffbeb;
  border-left: 4px solid #d97706;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0 12px;
}
.ws-focus-tip b { color: #b45309; }
.wsproj-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.wsproj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
  table-layout: fixed;
}
.wsproj-table th,
.wsproj-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.wsproj-table th { background: #f1f5f9; font-weight: 600; color: #475569; }
.wsproj-cell-wrap { word-break: break-all; white-space: pre-wrap; }
.wsproj-job {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.wsproj-job-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.wsproj-job-title { font-weight: 700; color: #0f172a; }
.wsproj-job-meta { color: #94a3b8; }
.wsproj-job-content { font-size: 13px; color: #334155; line-height: 1.6; white-space: pre-wrap; }
.wsproj-job-tech {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 8px;
}
.ws-warn {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  color: #b91c1c;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 8px 0;
}
@media (max-width: 720px) {
  .wsproj-grid { grid-template-columns: 1fr; }
  .wsproj-card-wide { grid-column: auto; }
}

/* ===================================================================
 * R259 · C-06 · 导出权限位被拒时的**常驻**提示条
 *   ★ 为什么不用 toast：toast 2.2 秒就消失 ⇒ 用户只看到「下载失败」
 *     却不知道**为什么**、也不知道该找谁 ⇒ 决策 C-06 要求「前端给明确原因」。
 *   ★ 容器由 SDK 自建（不依赖某个模板里有 #gt-dl-blocked）
 * =================================================================== */
.gt-dl-blocked {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 16px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid #ea580c;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.gt-dl-blocked.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.gt-dl-blocked[hidden] { display: none; }
.gt-dl-blocked-icon { font-size: 20px; line-height: 1.3; flex: 0 0 auto; }
.gt-dl-blocked-body { flex: 1 1 auto; min-width: 0; }
.gt-dl-blocked-title {
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 4px;
}
.gt-dl-blocked-detail {
  font-size: 13px;
  line-height: 1.6;
  color: #7c2d12;
  word-break: break-word;
}
.gt-dl-blocked-close {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #9a3412;
  cursor: pointer;
  padding: 0 2px;
}

/* =====================================================================
   R266 · 实名登记三级菜单 + 历史登记记录 + 修改重发
   ===================================================================== */

/* ---- 侧边栏三级（运营 → 实名登记 → 员工导入 / 历史登记记录） ---- */
.sidebar .nav-leaf-group { position: relative; }
.sidebar .nav-sub {
  margin: 2px 0 4px;
  padding-left: 14px;
  list-style: none;
}
.sidebar .nav-sub li a {
  display: block;
  padding: 6px 10px 6px 12px;
  font-size: 12.5px;
  color: #64748b;
  border-left: 2px solid #e2e8f0;
  border-radius: 0 4px 4px 0;
}
.sidebar .nav-sub li a:hover { color: #0f172a; background: #f1f5f9; }
.sidebar .nav-sub li a.active {
  color: #15803d;
  border-left-color: #15803d;
  background: #f0fdf4;
  font-weight: 600;
}

/* ---- 历史登记记录 · 统计徽标补充 ---- */
.rn-stat.incomplete { background: #fff7ed; color: #9a3412; }
.rn-stat.incomplete b { color: #c2410c; }
.rn-stat.left { background: #f1f5f9; color: #64748b; }

/* ---- 历史登记记录 · 完整度徽标 ---- */
.rn-comp-badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.rn-comp-badge.complete { background: #f0fdf4; color: #15803d; }
.rn-comp-badge.incomplete { background: #fff7ed; color: #c2410c; }

/* ---- 历史登记记录 · 详情弹窗（R246 三段式） ---- */
.modal-rn-hist .modal-rn-box {
  width: 860px;
  max-width: 94vw;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-rn-hist .modal-rn-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
}
.modal-rn-hist .modal-head { flex: 0 0 auto; padding: 14px 20px; }
.modal-rn-hist .modal-foot { flex: 0 0 auto; }

/* ---- 详情字段网格 ---- */
.rnh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 14px;
}
.rnh-kv {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 0;
}
.rnh-kv-wide { grid-column: span 3; }
.rnh-kv .k { font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
.rnh-kv .v { font-size: 13px; color: #0f172a; word-break: break-all; }

.rnh-sec {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.rnh-imgs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.rnh-img {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rnh-img img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: zoom-in;
}
.rnh-img span { font-size: 11px; color: #64748b; text-align: center; }
.rnh-img-empty {
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rnh-img-empty .ico { font-size: 22px; opacity: .4; }
.rnh-img-empty span { font-size: 11px; color: #94a3b8; }
@media (max-width: 720px) {
  .rnh-grid { grid-template-columns: repeat(2, 1fr); }
  .rnh-kv-wide { grid-column: span 2; }
  .rnh-imgs { grid-template-columns: repeat(3, 1fr); }
}

/* ---- 历史登记记录 · 表格操作按钮 detail（蓝） ---- */
.rn-audit-btn.detail { background: #eff6ff; color: #1d4ed8; }
.rn-audit-btn.detail:hover { background: #dbeafe; }

/* ---- 实名登记 · 修改重发横幅 ---- */
.realkyc-resubmit-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #92400e;
}
.realkyc-resubmit-banner b { color: #b45309; }
.rrb-ico { font-size: 16px; }
.rrb-back {
  margin-left: auto;
  color: #b45309;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12.5px;
}
.rrb-back:hover { text-decoration: underline; }

/* ===================================================================== */
/* ★ R285 · 消息通知（顶栏铃铛 + 通知事件页） */
/* ===================================================================== */

/* ---- 顶栏铃铛按钮 ---- */
.notif-bell {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  margin-left: 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.notif-bell:hover { background: #f1f5f9; border-color: #cbd5e1; }
.notif-bell-icon { display: block; }
.notif-bell .notif-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}

/* ---- 通知页 · 工作汇总卡 ---- */
.notif-summary {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface);
}
.notif-summary-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 10px;
}
.notif-summary-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.notif-summary-cell {
  flex: 1 1 120px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.notif-summary-cell b { font-size: 20px; font-variant-numeric: tabular-nums; }
.notif-summary-cell span { font-size: 12px; color: var(--text-dim); }
.notif-summary-cell .notif-hot { color: #dc2626; }

/* ---- 通知页 · 事件列表 ---- */
.notif-list-section {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.notif-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.notif-list-sub { color: var(--text-dim); font-size: 12px; }
.notif-list { display: block; }
.notif-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none; border-bottom: 1px solid var(--border);
  background: transparent;
  font: inherit; color: var(--text); text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f1f5f9; }
.notif-item-unread { background: #f0f9ff; }
.notif-item-unread:hover { background: #e0f2fe; }
.notif-item-icon { font-size: 20px; flex: 0 0 auto; }
.notif-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-item-who { font-size: 13px; font-weight: 600; }
.notif-new {
  font-style: normal;
  padding: 1px 6px; border-radius: 4px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
}
.notif-item-detail {
  font-size: 12.5px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-item-time { flex: 0 0 auto; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 13px; color: var(--text-dim);
}
.notif-foot-tip {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  font-size: 12px; color: var(--text-dim);
}

/* ===================================================================== */
/* ★ R286 · 套餐提醒事件弹窗（通知页点击展示，不点击不展示）                    */
/*   顶置常驻 banner 已下线；弹窗三态配色沿用原 banner 语义。                   */
/* ===================================================================== */
.notif-plan-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.notif-plan-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  width: min(420px, 100%);
  overflow: hidden;
}
.notif-plan-warning { border-top: 4px solid #f59e0b; }
.notif-plan-urgent  { border-top: 4px solid #ea580c; }
.notif-plan-expired { border-top: 4px solid #dc2626; }
.notif-plan-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 8px;
}
.notif-plan-icon { font-size: 22px; }
.notif-plan-title { font-size: 15px; font-weight: 700; color: #0f172a; flex: 1 1 auto; }
.notif-plan-close {
  flex: 0 0 auto;
  border: none; background: #f1f5f9; color: #64748b;
  width: 26px; height: 26px; border-radius: 6px;
  font-size: 13px; line-height: 1; cursor: pointer;
}
.notif-plan-close:hover { background: #e2e8f0; color: #0f172a; }
.notif-plan-body { padding: 6px 16px 16px; }
.notif-plan-text {
  font-size: 13px; color: #334155; line-height: 1.7; margin: 0 0 10px;
}
.notif-plan-meta {
  font-size: 12px; color: var(--text-dim); line-height: 1.7; margin: 0 0 12px;
}
.notif-plan-cta {
  display: inline-block;
  background: #f59e0b; color: #fff;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
}
.notif-plan-cta:hover { background: #d97706; }
.notif-plan-cta-plain {
  background: #f1f5f9; color: #64748b; cursor: default;
}
.notif-plan-cta-plain:hover { background: #f1f5f9; }

/* ===================================================================== */
/* ★ R338 · 打卡违规取证弹窗（notif-plan-* 骨架 + 取证表格）                    */
/*   弹窗三段式（R246 纪律）：head 固定 / viol-scroll 唯一滚动区 / 底部 CTA 外置 */
/* ===================================================================== */
.notif-viol-modal {
  width: min(480px, 100%);
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
}
.notif-viol-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.notif-viol-window { margin: 4px 0 14px; }
.notif-viol-window-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}
.notif-viol-window-head b { font-size: 13px; color: #b91c1c; }
.notif-viol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.notif-viol-table th {
  text-align: left;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
}
.notif-viol-table td {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  color: #334155;
  white-space: nowrap;
}
.notif-viol-table .viol-date { color: #0f172a; font-weight: 600; }
.notif-viol-table .viol-plat { color: #b91c1c; font-weight: 600; }
.notif-viol-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* ---- R347 · 运营端租户明细「查看」详情弹窗 ---- */
.td-view-btn { padding: 2px 10px; font-size: 12px; }
.td-detail-x { background: none; border: 0; font-size: 20px; color: #94a3b8; cursor: pointer;
  line-height: 1; padding: 4px 8px; margin-left: auto; flex-shrink: 0; }
.td-detail-x:hover { color: #0f172a; }
.td-detail-body { max-height: 62vh; overflow-y: auto; padding: 0 20px 20px; }
.td-detail-head { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0 4px; flex-wrap: wrap; }
.td-detail-name { font-size: 16px; font-weight: 700; color: #0f172a; display: flex;
  align-items: baseline; gap: 8px; flex-wrap: wrap; }
.td-detail-plan { display: flex; align-items: center; gap: 8px; }
.td-detail-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 4px 0 10px; border-bottom: 1px solid #e2e8f0; margin-bottom: 10px; }
.td-detail-kpis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 12px; }
.td-detail-kpis > div { text-align: center; background: #f8fafc; border-radius: 8px; padding: 8px 4px; }
.td-detail-kpis b { display: block; font-size: 16px; color: #2563eb; }
.td-detail-kpis span { display: block; font-size: 11px; color: #64748b; margin-top: 2px; }
.td-detail-sec { font-size: 13px; font-weight: 600; color: #334155; margin: 10px 0 6px; }
.td-detail-body .dash-table { margin-bottom: 4px; }
@media (max-width: 720px) { .td-detail-kpis { grid-template-columns: repeat(4, 1fr); } }

/* ---- R347b · 租户详情弹窗骨架（中性蓝调，独立于 del-modal 红色系） ---- */
.td-detail-modal { position: relative; display: flex; flex-direction: column;
  width: min(640px, 96vw); max-height: 90vh; background: #fff; border-radius: 12px;
  border-top: 4px solid #2563eb; box-shadow: 0 20px 60px rgba(15, 23, 42, .25); }
.td-detail-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px;
  border-bottom: 1px solid #e2e8f0; background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); }
.td-detail-titles { flex: 1; min-width: 0; }
.td-detail-t1 { font-size: 18px; font-weight: 700; color: #0f172a; }
.td-detail-t2 { font-size: 12px; color: #64748b; margin-top: 2px; }
@media (max-width: 720px) { .td-detail-modal { width: 100vw; max-height: 100vh; border-radius: 0; } }

/* ---- ★ R352 · 业务员推广（档案/名册/明细弹窗） ---- */
.sr-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 0 2px; }
.sr-form input, .sr-form select { padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 13px; min-width: 150px; }
.sr-form #sr-note { flex: 1 1 260px; }
.sr-form.col { flex-direction: column; align-items: stretch; }
.sr-form.col label { display: flex; gap: 10px; align-items: center; font-size: 13px; color: #334155; }
.sr-form.col input, .sr-form.col select { flex: 1; }
.sr-msg { font-size: 13px; color: #047857; margin: 6px 0 0; }
.sr-msg.err { color: #b91c1c; }
.sr-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; font-size: 13px;
  color: #334155; padding: 10px 0; }
.sr-kpi-line { font-size: 13px; color: #475569; background: #eff6ff; border-radius: 8px;
  padding: 8px 12px; margin: 6px 0 10px; }
.sr-kpi-line strong { color: #1d4ed8; }
.td-del-btn { padding: 2px 10px; font-size: 12px; color: #b91c1c; border-color: #fecaca; }
.badge-plan { display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.td-detail-title.small { font-size: 14px; font-weight: 700; color: #0f172a; padding-top: 8px; }

/* =====================================================================
 * R369 · 打卡围栏管理弹窗（租户「项目与工地」行内「围栏」按钮）
 * 仅 tenant projects 视图渲染此结构；web/worker 不受影响。
 * ===================================================================== */
.fence-summary { font-size: 13px; color: var(--text-dim, #8494a8); margin: 10px 0 6px; }
.fence-list-box {
  max-height: 260px; overflow-y: auto;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc; padding: 6px; margin-bottom: 14px;
}
.fence-list-box .empty { text-align: center; color: #8494a8; font-size: 13px; padding: 18px 8px; }
.fence-list-box .loading { text-align: center; color: #8494a8; font-size: 13px; padding: 18px 8px; }
.fence-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 10px 12px; margin: 4px 2px;
}
.fence-item-main { min-width: 0; }
.fence-item-name { font-weight: 600; color: #1e293b; margin-right: 8px; }
.fence-kind-tag {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px;
  margin-right: 6px; border: 1px solid transparent;
}
.fence-kind-checkin  { background: #e8f1fe; color: #1d4ed8; border-color: #cfe0fd; }
.fence-kind-checkout { background: #fdf1e3; color: #b45309; border-color: #f5dcc0; }
.fence-kind-area     { background: #e7f6ec; color: #047857; border-color: #c4ead2; }
.fence-on-tag {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px;
}
.fence-on-tag.on  { background: rgba(5, 150, 105, .1); color: #059669; }
.fence-on-tag.off { background: rgba(100, 116, 139, .12); color: #64748b; }
.fence-meta { font-size: 12px; color: #64748b; margin-top: 4px; }
.fence-form-title { margin: 4px 0 10px; font-size: 14px; color: #334155; font-weight: 600; }
.fence-enabled-cell { display: flex; align-items: center; gap: 8px; }
.fence-enabled-cell input[type="checkbox"] { width: auto; }
.fence-coord-acts { display: flex; gap: 10px; margin: 4px 0 10px; flex-wrap: wrap; }
.fence-act-btn {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  border: 1px solid #dbe3ee; background: #fff; color: #334155; cursor: pointer;
}
.fence-act-btn:hover { border-color: #2563eb; color: #1d4ed8; }
.fence-act-btn.danger-text:hover { border-color: #dc2626; color: #dc2626; }
