/* ============================================================
   zt-theme.css  正彤智护 · 统一高级主题覆盖层 v142ui
   零侵入：挂在 style.css / mobile.css 之后，只改视觉，不改结构与逻辑；删除引用即回滚。
   设计语言：正彤蓝 #1539BB 主色 / 克制中性灰 / 柔和分层阴影 / 统一圆角与聚焦 / 企业级 SaaS 质感
   ============================================================ */

/* ---------- 1. 设计令牌：把原“橙金”变量统一为正彤蓝高级色系（一处改、全站联动） ---------- */
:root{
  --brand:#1539BB;  --brand-hover:#0e2a8c;  --brand-dark:#10305a;
  --accent:#0e2a8c; --accent-hover:#1539BB;
  --border-focus:#1539BB;
  --bg-deep:#f4f6fb; --bg-card:#FFFFFF; --bg-card-hover:#f8faff;
  --bg-elevated:#f8fafc; --bg-input:#FFFFFF;          /* 输入改白底，去脏灰 */
  --text-primary:#1f2937; --text-secondary:#4b5563; --text-muted:#6b7280; --text-dim:#9ca3af;
  --border:#e5e7eb; --border-light:#d1d5db; --divider:#eef0f4;
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
  --shadow-md:0 4px 16px rgba(16,24,40,.08);
  --shadow-lg:0 20px 60px rgba(15,23,42,.18), 0 2px 8px rgba(15,23,42,.06);
  --radius-sm:6px; --radius-md:9px; --radius-lg:16px;
  --zt-primary:#1539BB; --zt-primary-soft:rgba(20,64,120,.08);
}

/* 全局字体渲染与过渡，更细腻 */
body{ -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; color:var(--text-primary); }
input,select,textarea,button{ transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease,color .18s ease; }
::selection{ background:rgba(20,64,120,.16); }
::-webkit-scrollbar{ width:9px;height:9px; }
::-webkit-scrollbar-thumb{ background:#cbd5e1; border-radius:8px; border:2px solid transparent; background-clip:content-box; }
::-webkit-scrollbar-thumb:hover{ background:#94a3b8; background-clip:content-box; }
::-webkit-scrollbar-track{ background:transparent; }

/* ---------- 2. 弹窗（Modal）：柔和大投影、品牌细顶线、深色标题、克制留白 ---------- */
.modal-overlay{ background:rgba(15,23,42,.46) !important; backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); }
.modal-box{
  border:1px solid #eef0f4 !important;
  border-radius:16px !important;
  box-shadow:var(--shadow-lg) !important;
  padding:24px 26px !important;
}
.modal-box::before{ height:2px !important; border-radius:16px 16px 0 0;
  background:linear-gradient(90deg,#1539BB,#0e2a8c) !important; }
.modal-box h3{ color:#111827 !important; font-size:17px !important; font-weight:600 !important; letter-spacing:.2px; }
.modal-header{ padding:16px 20px !important; border-bottom:1px solid #f1f3f7 !important; }
.modal-header h3{ color:#111827 !important; font-weight:600 !important; }
.modal-close{ border-radius:7px; transition:background .15s,color .15s; }
.modal-close:hover{ background:#f3f4f6; color:#111827; }
.modal-box .form-row{ margin-bottom:15px !important; }
.modal-box label{ color:#374151 !important; font-weight:500; }
.modal-box .required{ color:#ef4444; }

/* ---------- 3. 表单控件：白底、细边、主色聚焦光晕、统一高度 ---------- */
.form-row input,.form-row select,.form-row textarea,
.modal-box input,.modal-box select,.modal-box textarea{
  background:#fff !important; border:1px solid #e2e6ee !important; border-radius:9px !important;
  padding:9px 12px !important; color:#1f2937 !important;
}
.form-row input:focus,.form-row select:focus,.form-row textarea:focus,
.modal-box input:focus,.modal-box select:focus,.modal-box textarea:focus{
  border-color:var(--zt-primary) !important;
  box-shadow:0 0 0 3px rgba(20,64,120,.12) !important; outline:none !important;
}
.form-row input::placeholder,.modal-box input::placeholder{ color:#b6bdca; }
select{ appearance:none; background-image:linear-gradient(45deg,transparent 50%,#9ca3af 50%),linear-gradient(135deg,#9ca3af 50%,transparent 50%);
  background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%; background-size:5px 5px,5px 5px; background-repeat:no-repeat; padding-right:30px !important; }

/* ---------- 4. 按钮：主行动正彤蓝、次行动白底灰边、统一高度与交互 ---------- */
.modal-box .btn-submit,.btn-submit{
  background:linear-gradient(135deg,#0e2a8c,#1539BB) !important; color:#fff !important;
  border:none !important; border-radius:9px !important; padding:9px 24px !important; font-weight:500 !important;
  box-shadow:0 2px 8px rgba(20,64,120,.22);
}
.modal-box .btn-submit:hover,.btn-submit:hover{ background:linear-gradient(135deg,#0e2a8c,#0e2a8c)!important; box-shadow:0 4px 14px rgba(20,64,120,.3); }
.modal-box .btn-cancel,.btn-cancel{
  background:#fff !important; border:1px solid #d8dde8 !important; color:#4b5563 !important;
  border-radius:9px !important; padding:9px 20px !important;
}
.modal-box .btn-cancel:hover,.btn-cancel:hover{ background:#f6f8fc !important; border-color:#c3cad8 !important; color:#1f2937 !important; }
.modal-box .modal-actions{ border-top:1px solid #f1f3f7 !important; padding-top:15px !important; gap:10px !important; }
/* .btn-add 是全站用量最大的填充按钮：原默认橙底，统一为正彤蓝主按钮（内联指定红/绿/灰的语义按钮不受影响） */
.btn-add{
  border-radius:9px !important; font-weight:500;
  background:linear-gradient(135deg,#0e2a8c,#1539BB) !important; color:#fff !important;
  border:1px solid transparent !important; box-shadow:0 2px 8px rgba(20,64,120,.18);
}
.btn-add:hover{ background:linear-gradient(135deg,#0e2a8c,#0e2a8c) !important; box-shadow:0 4px 14px rgba(20,64,120,.28); }
/* 去橙金兜底：历史硬编码橙色（#d97706/#CC4422/#CC4422/#CC4422/#CC4422）主按钮归一正彤蓝；红=危险、绿=成功保留 */
.btn-add[style*="ea580c"],.btn-add[style*="EA580C"],.btn-add[style*="f97316"],.btn-add[style*="F97316"],
.btn-add[style*="FA8C16"],.btn-add[style*="fa8c16"],.btn-add[style*="ffa500"],.btn-add[style*="FFA500"],
.btn-add[style*="ff8c00"],.btn-add[style*="FF8C00"],.btn-add[style*="f59e0b"],.btn-add[style*="F59E0B"],
button[style*="ea580c"],button[style*="EA580C"],button[style*="f97316"],button[style*="FA8C16"],
button[style*="ffa500"],button[style*="ff8c00"]{
  background:linear-gradient(135deg,#0e2a8c,#1539BB) !important; color:#fff !important; border-color:transparent !important;
}
button:active:not(:disabled){ transform:translateY(.5px); }
button:disabled{ opacity:.55; cursor:not-allowed; }

/* ---------- 5. 数据表格：浅雅表头、主色行 hover（替换原橙色）、去硬边 ---------- */
.data-table{ border:1px solid #edf0f5 !important; border-radius:12px !important; overflow:hidden; box-shadow:var(--shadow-sm); }
.data-table th,.data-table thead th{ background:#f8fafc !important; color:#475569 !important; font-weight:600 !important; border-color:#edf0f5 !important; }
.data-table td{ border-color:#f1f3f7 !important; }
.data-table tbody tr:nth-child(even) td{ background:#fafbfe !important; }
.data-table tbody tr:hover td,.data-table tbody:nth-child(even) tr:hover td{ background:var(--zt-primary-soft) !important; }

/* ---------- 6. 统计卡片 / 通用卡片：柔和阴影、hover 微浮 ---------- */
.statGridRow .stat-card,.stat-card,.stat-item{
  border:1px solid #edf0f5 !important; border-radius:13px !important;
  box-shadow:0 1px 3px rgba(16,24,40,.05) !important; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.statGridRow .stat-card:hover,.stat-card:hover{ transform:translateY(-2px); box-shadow:0 8px 24px rgba(16,24,40,.10) !important; border-color:#dbe3f3 !important; }
.stat-item .num{ color:#10305a !important; }

/* ---------- 7. 侧栏导航：选中主色浅底 + 左条，hover 柔和 ---------- */
.menu-item:hover,.nav-item:hover{ background:#f5f8ff !important; }
.menu-item.active,.nav-item.active,.side-menu .active{
  background:var(--zt-primary-soft) !important; color:#1539BB !important;
  box-shadow:inset 3px 0 0 #1539BB; border-radius:0 8px 8px 0;
}
/* 状态徽章统一 */
.status-badge{ border-radius:999px; font-weight:500; }

/* ---------- 8. 新增/编辑工人弹窗专属精修（高端、舒展、读卡并排） ---------- */
#workerModal .modal-box{ width:620px !important; max-width:94vw; border-radius:18px !important; overflow:hidden; padding:0 !important; }
#workerModal .modal-header{ padding:18px 24px !important; background:linear-gradient(135deg,#f6f9ff,#ffffff); border-bottom:1px solid #eef1f6 !important; }
#workerModal .modal-header h3{ font-size:18px !important; margin:0; }
#workerModal .modal-close{ font-size:18px; width:32px; height:32px; display:flex; align-items:center; justify-content:center; }
#workerModal .modal-body{ padding:20px 24px 8px !important; max-height:70vh; overflow-y:auto; }
#workerModal .modal-footer{ padding:14px 24px !important; background:#fafbfe; border-top:1px solid #eef1f6 !important; justify-content:flex-end; gap:10px; }
/* form-row：标签在上、控件整行、统一高度与圆角 */
#workerModal .form-row{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin-bottom:14px !important; }
#workerModal .form-row > label{ flex:0 0 100%; font-size:13px; color:#475569; font-weight:500; margin:0 !important; }
#workerModal .form-row input:not([type=checkbox]):not([type=file]):not([type=time]),
#workerModal .form-row select{
  height:40px; line-height:40px; border-radius:10px !important; padding:0 13px !important;
  background:#fff !important; border:1px solid #e2e6ee !important; flex:1 1 auto; min-width:0; width:auto; color:#1f2937;
}
#workerModal .form-row input[type=time]{ height:40px; border-radius:10px !important; border:1px solid #e2e6ee; padding:0 10px; background:#fff; }
#workerModal .form-row input:focus,#workerModal .form-row select:focus{ border-color:#1539BB !important; box-shadow:0 0 0 3px rgba(20,64,120,.12) !important; outline:none; }
/* 姓名框 + 读身份证按钮同一行 */
#workerModal #fWorkerName{ flex:1 1 auto !important; width:auto !important; min-width:0; }
#ztInlineReadId{
  flex:0 0 auto !important; display:inline-flex; align-items:center; justify-content:center;
  height:40px; margin:0 !important; padding:0 16px !important;
  background:linear-gradient(135deg,#0e2a8c,#1539BB) !important; color:#fff !important; border:none !important;
  border-radius:10px !important; font-size:13.5px; font-weight:500; white-space:nowrap; cursor:pointer;
  box-shadow:0 2px 8px rgba(20,64,120,.22);
}
#ztInlineReadId:hover{ background:linear-gradient(135deg,#0e2a8c,#0e2a8c) !important; }
#ztInlineReadIdStat{ flex:1 1 100% !important; width:100% !important; font-size:12px; color:#9ca3af; margin-top:2px !important; }
/* 性别 + 年龄同一行（该行有两个 label，不能各占整行） */
#workerModal .form-row:has(#fWorkerAge)>label{ flex:0 0 auto; }
#workerModal .form-row:has(#fWorkerAge) select{ flex:0 0 150px; }
#workerModal #fWorkerAge{ flex:0 0 120px !important; width:120px !important; }
/* 文件上传框更精致 */
#workerModal input[type=file]{ flex:1; font-size:12px; border:1px dashed #c9d2e3; border-radius:9px; padding:7px 9px; background:#f8fafc; color:#64748b; }
/* 更多信息 / 上下班时间虚线分组 */
#workerModal .form-row[style*="dashed"]{ background:#fafbfe !important; border-color:#dbe3f3 !important; border-radius:12px !important; padding:12px !important; }
#workerModal .modal-footer .btn-submit,#workerModal .modal-footer .btn-cancel{ height:40px; padding:0 22px !important; border-radius:10px !important; }

/* ---------- 9. 顶部/登录细节 ---------- */
.login-btn{ border-radius:10px !important; box-shadow:0 6px 18px rgba(20,64,120,.22) !important; }
input[type=checkbox],input[type=radio]{ accent-color:#1539BB; }
a{ color:#1539BB; }
/* 浮动提示更精致 */
#floatingMsg,.floating-msg,.toast{ border-radius:10px !important; box-shadow:0 8px 28px rgba(15,23,42,.16) !important; }


/* ============================================================
   zt-theme.css · v150ui 增补（UI 走查修复批，纯视觉零侵入，删除本段即回滚）
   ============================================================ */

/* ---------- 10.【P0 根治】主行动按钮：蓝底白字，解决"提交/确认/打款/添加计划/报验看不清" ----------
   根因：#app .btn-primary 历史规则只刷了蓝底、没钉白字；而更靠后的 .btn{color:#4E5969!important}
   把按钮文字压成深灰，深蓝底+深灰字几乎不可见、远看像空块。此处用 #app 提升特异性一次收口。 */
#app .btn-primary{
  background:linear-gradient(135deg,#0e2a8c,#1539BB)!important;
  color:#fff!important; border:1px solid transparent!important; text-shadow:none!important;
  display:inline-flex!important; align-items:center; justify-content:center; gap:5px;
  min-height:32px; padding:6px 18px!important; border-radius:9px!important;
  font-weight:500; white-space:nowrap; cursor:pointer;
  box-shadow:0 2px 8px rgba(20,64,120,.20);
}
#app .btn-primary:hover{background:linear-gradient(135deg,#0e2a8c,#0e2a8c)!important;color:#fff!important;box-shadow:0 4px 14px rgba(20,64,120,.30)!important;}
#app .btn-primary:disabled{opacity:.55;cursor:not-allowed;}
.v99-modal .btn-primary,.modal-box .btn-primary{height:36px!important;padding:0 22px!important;}
/* 弹窗内次按钮（取消/关闭）统一白底灰边，只作用于弹窗，不动页面工具栏 */
.v99-modal .btn:not(.btn-primary),.modal-box .btn:not(.btn-primary):not(.btn-submit){
  background:#fff!important;border:1px solid #d8dde8!important;color:#4b5563!important;
  border-radius:9px!important;height:36px!important;padding:0 20px!important;
  display:inline-flex!important;align-items:center;
}
.v99-modal .btn:not(.btn-primary):hover,.modal-box .btn:not(.btn-primary):not(.btn-submit):hover{background:#f6f8fc!important;border-color:#c3cad8!important;color:#1f2937!important;}

/* ---------- 11.【P1 质感统一】12 个 .v99-modal 纯内联弹窗（财务/采购线）纳入统一企业级样式 ---------- */
#app .v99-modal>div{
  border:1px solid #eef0f4!important;border-radius:16px!important;
  box-shadow:0 20px 60px rgba(15,23,42,.18),0 2px 8px rgba(15,23,42,.06)!important;
}
#app .v99-modal label{color:#374151!important;font-weight:500!important;font-size:13px!important;}
#app .v99-modal input,#app .v99-modal select,#app .v99-modal textarea{
  background:#fff!important;border:1px solid #e2e6ee!important;border-radius:9px!important;
  padding:9px 12px!important;color:#1f2937!important;box-sizing:border-box;font-size:13px;
}
#app .v99-modal input:focus,#app .v99-modal select:focus,#app .v99-modal textarea:focus{
  border-color:#1539BB!important;box-shadow:0 0 0 3px rgba(20,64,120,.12)!important;outline:none!important;
}
/* 下拉统一小箭头（app.js 内联 select 也有） */
#app .v99-modal select{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#9ca3af 50%),linear-gradient(135deg,#9ca3af 50%,transparent 50%)!important;background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%!important;background-size:5px 5px,5px 5px!important;background-repeat:no-repeat!important;padding-right:30px!important;}

/* ---------- 12.【P3 补漏】可点击元素的内联橙 #CC4422（主题此前遗漏的最大宗，41处）归一正彤蓝；状态徽章橙保留语义不动 ---------- */
#app button[style*="FF7D00"],#app button[style*="ff7d00"],
#app a.btn[style*="FF7D00"],#app a.btn[style*="ff7d00"],
#app .btn[style*="FF7D00"],#app .btn[style*="ff7d00"]{
  background:linear-gradient(135deg,#0e2a8c,#1539BB)!important;color:#fff!important;border-color:transparent!important;
}

/* ============================================================
   zt-theme.css · v151ui 二次增补（财务/采购线弹窗根治，纯视觉零侵入，删除本段即回滚）
   根因：app.js 的 .v99-modal 弹窗用 document.body.insertAdjacentHTML 直接挂到 <body>，
   是 #app 的兄弟而非子节点；v150ui 的 "#app .btn-primary / #app .v99-modal …" 选择器因此
   选不中它们，主按钮落回白底浅灰字（源码有“提交/保存/确认开户”文字却看不见，远看像空按钮）。
   本段去掉 #app 作用域限制，对“无论挂哪”的 .v99-modal / .modal-box 一律生效。
   ============================================================ */

/* 13.【P0 根治·去作用域】弹窗主行动按钮：蓝底白字，#app 内外都生效 */
.v99-modal .btn-primary, .modal-box .btn-primary,
body .v99-modal .btn-primary, body .modal-box .btn-primary{
  background-color:#1539BB!important;
  background-image:linear-gradient(135deg,#0e2a8c,#1539BB)!important;
  color:#ffffff!important; border:1px solid transparent!important; text-shadow:none!important;
  display:inline-flex!important; align-items:center; justify-content:center; gap:5px;
  height:36px!important; min-height:34px; padding:0 22px!important; border-radius:9px!important;
  font-size:13px!important; font-weight:500!important; line-height:1; white-space:nowrap; cursor:pointer;
  box-shadow:0 2px 8px rgba(20,64,120,.20);
}
.v99-modal .btn-primary:hover, .modal-box .btn-primary:hover,
body .v99-modal .btn-primary:hover, body .modal-box .btn-primary:hover{
  background-color:#0e2a8c!important;
  background-image:linear-gradient(135deg,#0e2a8c,#0e2a8c)!important; color:#fff!important;
  box-shadow:0 4px 14px rgba(20,64,120,.30)!important;
}
.v99-modal .btn-primary:disabled, .modal-box .btn-primary:disabled{ opacity:.55; cursor:not-allowed; }

/* 14.【P0 配套】挂 body 的 .v99-modal 容器与控件统一企业级质感（补齐 v150ui 漏掉的作用域） */
.v99-modal>div, body .v99-modal>div{
  border:1px solid #eef0f4!important; border-radius:16px!important;
  box-shadow:0 20px 60px rgba(15,23,42,.18),0 2px 8px rgba(15,23,42,.06)!important;
}
.v99-modal label, body .v99-modal label{ color:#374151!important; font-weight:500!important; font-size:13px!important; }
.v99-modal input, .v99-modal select, .v99-modal textarea,
body .v99-modal input, body .v99-modal select, body .v99-modal textarea{
  background:#fff!important; border:1px solid #e2e6ee!important; border-radius:9px!important;
  padding:9px 12px!important; color:#1f2937!important; box-sizing:border-box; font-size:13px;
}
.v99-modal input:focus, .v99-modal select:focus, .v99-modal textarea:focus,
body .v99-modal input:focus, body .v99-modal select:focus, body .v99-modal textarea:focus{
  border-color:#1539BB!important; box-shadow:0 0 0 3px rgba(20,64,120,.12)!important; outline:none!important;
}
.v99-modal select, body .v99-modal select{
  appearance:none; -webkit-appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#9ca3af 50%),linear-gradient(135deg,#9ca3af 50%,transparent 50%)!important;
  background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%!important;
  background-size:5px 5px,5px 5px!important; background-repeat:no-repeat!important; padding-right:30px!important;
}
.v99-modal .btn:not(.btn-primary), body .v99-modal .btn:not(.btn-primary){
  background:#fff!important; border:1px solid #d8dde8!important; color:#4b5563!important;
  border-radius:9px!important; height:36px!important; padding:0 20px!important;
  display:inline-flex!important; align-items:center;
}
.v99-modal .btn:not(.btn-primary):hover, body .v99-modal .btn:not(.btn-primary):hover{
  background:#f6f8fc!important; border-color:#c3cad8!important; color:#1f2937!important;
}

/* 15.【去作用域补漏】内联橙按钮归一正彤蓝（挂 body 的弹窗同样适用；红/绿语义色保留） */
button[style*="FF7D00"],button[style*="ff7d00"],a.btn[style*="FF7D00"],.btn[style*="FF7D00"],.btn[style*="ff7d00"]{
  background:linear-gradient(135deg,#0e2a8c,#1539BB)!important;color:#fff!important;border-color:transparent!important;
}
