/* 智客引擎 · 全局 UI 统一
   去除浏览器原生控件样式：input/select/textarea/checkbox 统一样式、select 自定义箭头、
   number 去除原生步进器、focus 高亮、滚动条、自定义确认弹窗 */
:root{--zk-brand:#2f6f9f;--zk-line:#dfe5ec;--zk-text:#24323d;--zk-text3:#9aa8b5;--zk-input-h:38px}

/* ===== 表单控件统一（页面主体 + 弹窗） ===== */
input[type=text],input[type=password],input[type=number],input[type=email],input[type=tel],
input[type=search],input[type=url],input[type=date],input[type=time],input[type=datetime-local],
select,textarea{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  font:inherit;color:var(--zk-text,#24323d);
  background:#fff;border:1px solid var(--zk-line,#dfe5ec);border-radius:8px;
  padding:0 12px;height:var(--zk-input-h);box-sizing:border-box;
  outline:none;transition:border-color .15s,box-shadow .15s,background .15s;
}
/* 宽度由使用处决定：弹窗内 100%，筛选行内自适应 */
.modal-body input[type=text],.modal-body input[type=password],.modal-body input[type=number],
.modal-body input[type=email],.modal-body input[type=tel],.modal-body input[type=search],
.modal-body input[type=url],.modal-body input[type=date],.modal-body input[type=time],
.modal-body input[type=datetime-local],.modal-body select,.modal-body textarea{width:100%}

select{
  padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;background-size:16px;
  cursor:pointer;
}
select:disabled{background-image:none}
input[type=date],input[type=time],input[type=datetime-local]{padding-right:8px}
input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
input[type=number]{-moz-appearance:textfield}
textarea{height:auto;min-height:88px;padding:10px 12px;resize:vertical;line-height:1.65}
input:focus,select:focus,textarea:focus{
  border-color:var(--zk-brand,#2f6f9f);
  box-shadow:0 0 0 3px rgba(47,111,159,.13);
}
input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:#c3cdd7}
input::placeholder,textarea::placeholder{color:var(--zk-text3,#9aa8b5)}
input:disabled,select:disabled,textarea:disabled{background:#f3f5f7;color:#9aa8b5;cursor:not-allowed}

/* 勾选/单选：去除原生外观 */
input[type=checkbox],input[type=radio]{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  width:16px;height:16px;margin:0 6px 0 0;vertical-align:-3px;cursor:pointer;
  border:1px solid #c2cdd6;border-radius:4px;background:#fff;position:relative;flex:none;box-sizing:border-box;
}
input[type=radio]{border-radius:50%}
input[type=checkbox]:checked,input[type=radio]:checked{
  background:var(--zk-brand,#2f6f9f);border-color:var(--zk-brand,#2f6f9f);
}
input[type=checkbox]:checked::after{
  content:'';position:absolute;left:5px;top:1.5px;width:4px;height:8px;
  border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);
}
input[type=radio]:checked::after{content:'';position:absolute;left:4px;top:4px;width:6px;height:6px;border-radius:50%;background:#fff}
input[type=checkbox]:disabled,input[type=radio]:disabled{background:#eef1f4;cursor:not-allowed}
label{cursor:pointer}

/* ===== 自定义确认弹窗（替代原生 confirm） ===== */
.zk-confirm-mask{position:fixed;inset:0;background:rgba(15,23,32,.5);display:flex;align-items:center;justify-content:center;z-index:1200;animation:zkfade .18s ease;backdrop-filter:blur(2px)}
.zk-confirm{background:#fff;border-radius:16px;box-shadow:0 18px 54px rgba(15,36,56,.22);padding:24px 26px 20px;width:min(440px,88vw);box-sizing:border-box;animation:zkzoom .2s cubic-bezier(.2,.9,.3,1.15)}
.zk-confirm-msg{font-size:14px;line-height:1.8;color:var(--zk-text,#24323d);margin-bottom:22px;white-space:pre-wrap;word-break:break-word}
.zk-confirm-actions{display:flex;justify-content:flex-end;gap:10px}
.zk-confirm .btn{width:auto;margin:0}
@keyframes zkfade{from{opacity:0}to{opacity:1}}
@keyframes zkzoom{from{opacity:0;transform:scale(.94) translateY(6px)}to{opacity:1;transform:scale(1) translateY(0)}}

/* ===== 滚动条 ===== */
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-thumb{background:#c9d3dc;border-radius:5px;border:2px solid #f4f6f8}
::-webkit-scrollbar-thumb:hover{background:#aebac6}
::-webkit-scrollbar-track{background:transparent}

/* 消息未读角标 */
.badge{display:inline-block;min-width:16px;height:16px;line-height:16px;padding:0 5px;border-radius:10px;background:#e5484d;color:#fff;font-size:11px;text-align:center;vertical-align:2px;margin-left:4px}

/* ===== 日期/时间控件指示器：品牌色，去除浏览器原生外观差异 ===== */
input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator{
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a86' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E") no-repeat center center;
  background-size:16px;opacity:.55;cursor:pointer;width:18px;height:18px;margin-left:2px;
}
input[type=date]::-webkit-calendar-picker-indicator:hover,
input[type=time]::-webkit-calendar-picker-indicator:hover{opacity:.9}

/* datalist 输入提示：与普通输入一致，无原生弹层样式残留 */
input[list]::-webkit-calendar-picker-indicator{opacity:0;width:0;height:0}
/* ===== M18 表单栅格与文件按钮 ===== */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px}
.form-item{display:flex;flex-direction:column;gap:6px;min-width:0}
.form-item label{display:block;font-size:13px;color:var(--zk-text,#24323d);font-weight:600;margin:0;line-height:1.4}
.form-item .form-hint{font-size:11.5px;color:var(--zk-text3,#9aa8b5)}
.form-item.full{grid-column:1/-1}
.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;padding-top:16px;border-top:1px solid #eef1f5}
@media(max-width:640px){.form-grid{grid-template-columns:1fr}}

/* 文件选择：隐藏原生 input，按钮化 */
input[type=file]{position:fixed;left:-9999px;top:-9999px;opacity:0;width:1px;height:1px;overflow:hidden;pointer-events:none}
.file-btn{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:9px;border:1px dashed #c3cdd7;color:var(--zk-text3,#9aa8b5);background:#fafbfc;cursor:pointer;font-size:13px;font-family:inherit;transition:all .15s;height:var(--zk-input-h,38px);box-sizing:border-box}
.file-btn:hover{border-color:var(--zk-brand,#2f6f9f);color:var(--zk-brand,#2f6f9f);background:var(--zk-brand-soft,#e7f0f6)}
.file-btn .fname{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--zk-text,#24323d)}
.file-btn::before{content:'';width:16px;height:16px;flex:0 0 16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7a86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") no-repeat center center}

/* ===== M18 内嵌 zk-modal 弹窗体系（.zk-modal div 模式：默认隐藏，zk_open 居中弹出） ===== */
.zk-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:100;background:rgba(15,23,32,.5);backdrop-filter:blur(2px);animation:zkfade .18s ease}
.zk-modal-mask{position:absolute;inset:0;cursor:pointer}
.zk-modal-body{position:relative;background:#fff;border-radius:16px;box-shadow:0 18px 54px rgba(15,36,56,.22);width:560px;max-width:92vw;max-height:88vh;overflow-y:auto;padding:22px 24px 20px;animation:zkzoom .2s cubic-bezier(.2,.9,.3,1.15)}
.zk-modal-title{font-size:15.5px;font-weight:700;color:var(--zk-text,#24323d);margin-bottom:16px;padding-bottom:12px;border-bottom:1px dashed var(--zk-line,#e4e9ef);display:flex;align-items:center;gap:8px}
.zk-modal-title::before{content:'';width:3px;height:15px;border-radius:2px;background:var(--zk-brand,#2f6f9f)}
.zk-modal-foot{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:14px;border-top:1px solid #eef1f5}
.zk-modal .frm,.zk-modal-body .frm,.frm{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px}
.zk-modal .frm>div,.zk-modal-body .frm>div{display:flex;flex-direction:column;gap:6px;min-width:0}
.zk-modal .frm label,.zk-modal-body .frm label{display:block;font-size:13px;color:var(--zk-text,#24323d);font-weight:600;margin:0;line-height:1.4}
.zk-modal .frm input,.zk-modal .frm select,.zk-modal .frm textarea,.zk-modal-body .frm input,.zk-modal-body .frm select,.zk-modal-body .frm textarea{width:100%}
.zk-modal .frm textarea,.zk-modal-body .frm textarea{height:auto}
@media(max-width:640px){.zk-modal .frm,.frm{grid-template-columns:1fr}}

/* ===== M18 裸表单兜底：历史页面 label+input 兄弟结构（非 .frm 栅格）自动整齐 ===== */
.modal-body form > label{display:block;font-size:13px;font-weight:600;color:var(--zk-text,#24323d);margin:14px 0 6px;line-height:1.4}
.modal-body form > input[type=text],.modal-body form > input:not([type]),.modal-body form > input[type=number],.modal-body form > input[type=email],.modal-body form > input[type=password],.modal-body form > input[type=url],.modal-body form > input[type=date],.modal-body form > input[type=datetime-local],.modal-body form > select,.modal-body form > textarea{width:100%;box-sizing:border-box}
.modal-body form > textarea{min-height:56px}
.modal-body form > .zk-modal-foot{margin-top:18px}

/* ===== M18d 核销工作台统一视觉（.m-body/.m-top/.m-main + 核销卡） ===== */
.m-body{background:var(--bg,#f4f7fa);min-height:100vh}
.m-top{height:56px;background:rgba(255,255,255,.95);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 20px;position:sticky;top:0;z-index:40;box-shadow:var(--shadow-sm)}
.m-top .brand{display:flex;align-items:center;gap:10px}
.m-top-right{display:flex;align-items:center;gap:12px}
.m-main{padding:22px 24px 40px;max-width:1280px;width:100%;margin:0 auto;box-sizing:border-box}
.verify-box{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px 14px;background:#f7f9fb;border:1px solid var(--line);border-radius:12px;margin-bottom:12px}
.mini-card{background:var(--card,#fff);border:1px solid var(--line);border-radius:var(--r-lg,12px);padding:14px 16px;box-shadow:var(--shadow-sm);text-align:center}
.kpi-num{font-size:26px;font-weight:700;color:var(--accent,#d97706);line-height:1.2}
.kpi-label{font-size:12px;color:var(--text2,#5b6b79);margin-top:4px}
