:root{
  --brand:#7c5cff;
  --ok:#16a34a; --ok-bg:#dcfce7; --ok-border:#16a34a;
  --danger:#dc2626; --danger-bg:#fee2e2; --danger-border:#dc2626;
  --gray:#9ca3af; --gray-bg:#f3f4f6; --gray-border:#d1d5db;
  --bg:#f4f5f7; --surface:#ffffff;
  --text:#1f2937; --text-light:#6b7280;
  --radius:12px;
  --shadow:0 2px 8px rgba(0,0,0,0.06);
  --font-sans:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:var(--font-sans);
  background:var(--bg);
  color:var(--text);
  font-size:16px;
  line-height:1.5;
  -webkit-tap-highlight-color:transparent;
  overflow-x:hidden;
}
button{font-family:inherit}

/* 通用 */
.btn{
  padding:14px 20px;border:none;border-radius:var(--radius);
  font-size:16px;cursor:pointer;background:var(--surface);color:var(--text);
  border:1px solid #d1d5db;transition:all .15s;font-weight:500;
}
.btn:active{transform:scale(0.98)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.btn-ok{background:var(--ok);color:#fff;border-color:var(--ok)}
.btn-danger{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn-block{display:block;width:100%;padding:18px;font-size:18px;font-weight:600}
.btn-lg{padding:24px 20px;font-size:20px;font-weight:600;border-radius:14px}
.btn-ghost{background:transparent;border:none;color:var(--text-light);padding:8px 12px;font-size:14px;cursor:pointer}
.btn-tiny{
  display:block;margin:24px auto 0;padding:8px 16px;
  background:transparent;border:1px dashed #d1d5db;color:var(--text-light);
  border-radius:8px;font-size:13px;cursor:pointer;
}
.btn-tiny:active{background:#f9fafb}
.ipt{display:block;width:100%;padding:14px;border:1px solid #d1d5db;border-radius:var(--radius);font-size:16px;background:var(--surface);outline:none}
.ipt:focus{border-color:var(--brand)}

/* 登录页 */
/* ===== 登录页: 浅灰底 + 白卡 + 深蓝 ===== */
.login-wrap{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  padding:16px;background:var(--bg);
}
.login-form{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.login-form .ipt{padding:13px 14px;font-size:16px;border:1px solid #d1d5db;border-radius:10px;background:var(--surface)}
.login-form .ipt:focus{border-color:#1e3a5f;outline:none}
.login-err{color:var(--danger);font-size:13px;text-align:center;margin-top:8px;min-height:16px}

/* 主应用 */
#app{min-height:100vh;display:flex;flex-direction:column}
.topbar{background:var(--surface);border-bottom:1px solid #e5e7eb;padding:0 16px;height:56px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50}
.topbar-left{display:flex;align-items:center;gap:12px}
.brand{font-size:16px;font-weight:600}
.page-title{font-size:15px;color:var(--text-light)}
.topbar-right{display:flex;align-items:center;gap:8px}
.role-tag{font-size:13px;color:var(--text-light)}
.view{flex:1;padding:20px 16px 40px;max-width:640px;margin:0 auto;width:100%}

/* 状态色卡 */
.status-card{border-radius:14px;padding:32px 20px;text-align:center;margin-bottom:20px;border:2px solid;font-weight:600}
.status-card.gray{background:var(--gray-bg);border-color:var(--gray-border);color:#4b5563}
.status-card.red{background:var(--danger-bg);border-color:var(--danger-border);color:var(--danger)}
.status-card.green{background:var(--ok-bg);border-color:var(--ok-border);color:var(--ok)}
.status-card .title{font-size:22px;margin-bottom:8px}
.status-card .meta{font-size:14px;color:var(--text-light);font-weight:400}

/* 员工打卡卡片(支持多个区域) */
.checkin-card{
  border-radius:14px;
  border:3px solid var(--danger-border);
  background:#fff;
  padding:20px 16px;
  margin-bottom:16px;
  box-shadow:var(--shadow);
}
.checkin-card.green{border-color:var(--ok-border);background:var(--ok-bg)}
.checkin-card.red{border-color:var(--danger-border);background:var(--danger-bg)}
.checkin-card.gray{border-color:var(--gray-border);background:var(--gray-bg)}
.checkin-head{margin-bottom:16px;padding-bottom:12px;border-bottom:1px dashed rgba(0,0,0,0.1)}
.checkin-title{font-size:20px;font-weight:700;color:var(--text);margin-bottom:6px}
.photo-hint{font-size:13px;color:var(--text-light);margin-top:4px;line-height:1.4}
.checkin-area{font-size:15px;color:var(--text-light)}
.checkin-area span{font-weight:600;color:var(--text);font-size:17px}
.backup-tag{
  display:inline-block;margin-left:8px;padding:2px 8px;
  background:var(--brand);color:#fff;border-radius:6px;font-size:12px;font-weight:600;
}
.checkin-item{
  display:flex;align-items:center;gap:10px;
  padding:14px 12px;margin-bottom:10px;
  background:#fff;border:1px solid var(--danger-border);border-radius:10px;
}
.checkin-item.done{border-color:var(--ok-border);background:var(--ok-bg)}
.checkin-item.pending{border-color:var(--danger-border);background:#fff}
.item-label{flex:0 0 auto;font-size:16px;font-weight:600;color:var(--text)}
.photo-btn{
  flex:0 0 auto;padding:8px 14px;border:none;border-radius:8px;
  background:var(--brand);color:#fff;font-size:15px;cursor:pointer;font-weight:600;
}
.photo-btn:active{transform:scale(0.96)}
.item-status{flex:1;text-align:right;font-size:14px;font-weight:600}
.checkin-item.done .item-status{color:var(--ok)}
.checkin-item.pending .item-status{color:var(--danger)}
.checkin-complete{
  margin-top:14px;padding:16px;border-radius:10px;
  background:var(--ok);color:#fff;text-align:center;
}
.complete-title{font-size:18px;font-weight:700;margin-bottom:4px}
.complete-time{font-size:14px;opacity:0.95}

/* 员工列表(主管) */
.staff-row{
  display:grid;grid-template-columns:1fr auto;gap:8px;
  padding:16px 14px;border:1px solid #e5e7eb;border-left:5px solid;border-radius:10px;margin-bottom:10px;background:var(--surface);align-items:center;
}
.staff-row.green{border-left-color:var(--ok);background:#f0fdf4}
.staff-row.red{border-left-color:var(--danger);background:#fef2f2}
.staff-row.gray{border-left-color:var(--gray);background:#f9fafb}
.staff-row .left{min-width:0}
.staff-row .name{font-size:17px;font-weight:600;margin-bottom:2px}
.staff-row .area{font-size:14px;color:var(--text-light)}
.staff-row .right{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.staff-row .status-pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:500}
.staff-row .status-pill.green{background:var(--ok);color:#fff}
.staff-row .status-pill.red{background:var(--danger);color:#fff}
.staff-row .status-pill.gray{background:var(--gray);color:#fff}
.staff-row .missing{font-size:12px;color:var(--danger);margin-top:4px}
.staff-row .completed-at{font-size:12px;color:var(--text-light);margin-top:4px}
.staff-row .row-actions{margin-top:6px;display:flex;gap:6px}
.staff-row .row-actions button{padding:6px 10px;font-size:12px;border-radius:6px;border:1px solid #d1d5db;background:#fff;cursor:pointer}

/* 部门行(店长) */
.dept-row{
  display:grid;grid-template-columns:1fr auto;gap:8px;
  padding:16px 14px;border:1px solid #e5e7eb;border-left:5px solid;border-radius:10px;margin-bottom:10px;background:var(--surface);align-items:center;
}
.dept-row.green{border-left-color:var(--ok);background:#f0fdf4}
.dept-row.red{border-left-color:var(--danger);background:#fef2f2}
.dept-row.yellow{border-left-color:#f59e0b;background:#fffbeb}
.dept-row.gray{border-left-color:var(--gray);background:#f9fafb}
.dept-row{cursor:pointer}
.dept-row .left .name{font-size:17px;font-weight:600;margin-bottom:2px}
.dept-row .left .supervisor{font-size:14px;color:var(--text-light)}
.dept-row .right{text-align:right;display:flex;flex-direction:column;gap:6px;align-items:flex-end}
.dept-row .submitted-at{font-size:12px;color:var(--text-light);margin-top:4px}
.dept-row .status-pill{display:inline-block;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:500}
.dept-row .status-pill.green{background:var(--ok);color:#fff}
.dept-row .status-pill.red{background:var(--danger);color:#fff}
.dept-row .status-pill.yellow{background:#f59e0b;color:#fff}
.dept-row .status-pill.gray{background:var(--gray);color:#fff}
.dept-stats{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:6px;font-size:13px;color:var(--text-light)}
.dept-stats b{color:var(--text);font-weight:600}
.dept-stats .warn{color:var(--danger)}
.dept-stats .warn b{color:var(--danger)}
.ex-tag{display:inline-block;margin-left:6px;padding:1px 8px;background:#f59e0b;color:#fff;border-radius:6px;font-size:11px;font-weight:600}
/* 主管: 店长退回提示 */
.reject-banner{background:#fffbeb;border:1px solid #f59e0b;border-left:5px solid #f59e0b;color:#92400e;padding:12px 14px;border-radius:10px;margin-bottom:14px;font-size:14px;font-weight:500}
/* 店长: 部门详情弹窗 */
.detail-block{margin-bottom:16px;padding-bottom:12px;border-bottom:1px dashed #e5e7eb}
.detail-block:last-child{border-bottom:none}
.detail-title{font-size:15px;font-weight:600;color:var(--text);margin-bottom:6px}
.detail-sub{font-size:12px;color:var(--text-light);margin:8px 0 4px}
.detail-row{font-size:13px;color:var(--text);padding:4px 0;line-height:1.5}
.detail-row.ok{color:var(--ok)}
.detail-row.warn{color:var(--danger)}

/* 老板页面 */
.boss-final{
  border-radius:16px;padding:48px 24px;text-align:center;margin-bottom:24px;border:3px solid;
}
.boss-final.green{background:var(--ok-bg);border-color:var(--ok);color:var(--ok)}
.boss-final.red{background:var(--danger-bg);border-color:var(--danger);color:var(--danger)}
.boss-final.gray{background:var(--gray-bg);border-color:var(--gray-border);color:#4b5563}
.boss-final .icon{font-size:48px;margin-bottom:12px}
.boss-final .text{font-size:24px;font-weight:600;margin-bottom:8px}
.boss-final .meta{font-size:14px;color:var(--text-light);font-weight:400}
.boss-incomplete{margin-top:12px;padding:16px;border:1px solid var(--danger-border);border-radius:10px;background:#fef2f2}
.boss-incomplete .title{font-size:15px;font-weight:600;color:var(--danger);margin-bottom:8px}
.boss-incomplete .list{font-size:14px;color:var(--danger)}

/* 公休提示 */
.holiday-banner{
  padding:32px 20px;background:var(--gray-bg);border:1px dashed var(--gray-border);
  border-radius:14px;text-align:center;color:#4b5563;font-size:18px;font-weight:500;margin-bottom:20px;
}

/* 临时到店区域选择 */
.area-check-list{display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0}
.area-check{
  display:flex;align-items:center;gap:10px;padding:14px;border:1px solid #e5e7eb;border-radius:10px;background:var(--surface);cursor:pointer;
}
.area-check:hover{border-color:var(--brand)}
.area-check input{width:20px;height:20px}
.area-check label{flex:1;cursor:pointer;font-size:16px}
.area-check .dept{font-size:12px;color:var(--text-light)}

/* 弹窗 */
.modal{position:fixed;inset:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;z-index:200;padding:16px}
.modal-card{background:var(--surface);border-radius:16px;max-width:420px;width:100%;max-height:90vh;display:flex;flex-direction:column}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e5e7eb}
.modal-head span{font-weight:600;font-size:16px}
.modal-body{padding:20px;overflow-y:auto;flex:1}
.modal-foot{padding:12px 20px;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end;gap:8px}
.btn-icon{background:none;border:none;font-size:22px;cursor:pointer;color:var(--text);padding:4px 8px}

/* Toast */
.toast{position:fixed;top:20px;left:50%;transform:translateX(-50%);background:#1f2937;color:#fff;padding:12px 24px;border-radius:10px;font-size:15px;z-index:300;box-shadow:0 4px 12px rgba(0,0,0,0.2)}
.toast.ok{background:var(--ok)}
.toast.err{background:var(--danger)}

/* 空状态 */
.empty{text-align:center;padding:40px 20px;color:var(--text-light);font-size:15px}

/* 部门主管多部门场景 */
.dept-section{margin-bottom:24px}
.dept-section-title{font-size:17px;font-weight:600;margin-bottom:10px;padding-left:4px}

/* 桌面端 */
@media(min-width:768px){
  .view{padding:24px 20px 60px}
}

/* ===== 人员管理 ===== */
.personnel-wrap{padding:0 0 60px}
.personnel-summary{display:flex;gap:10px;margin-bottom:16px}
.sum-card{flex:1;background:#fff;border-radius:10px;padding:14px 8px;text-align:center;box-shadow:var(--shadow)}
.sum-num{font-size:24px;font-weight:700;color:var(--brand)}
.sum-label{font-size:13px;color:var(--text-light);margin-top:2px}
.personnel-dept{background:#fff;border-radius:10px;margin-bottom:12px;box-shadow:var(--shadow);overflow:hidden}
.pd-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#f5f6f8;border-bottom:1px solid #eee}
.pd-name{font-size:17px;font-weight:700;color:var(--text);flex:0 0 auto}
.pd-count{font-size:14px;font-weight:600;color:var(--brand);flex:0 0 auto}
.pd-sup{font-size:13px;color:var(--text-light);margin-left:auto}
.pd-staff{padding:8px 14px}
.pd-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #f0f0f0;font-size:15px}
.pd-item:last-child{border-bottom:none}
.pd-item.is-sup{background:var(--ok-bg);margin:0 -14px;padding:8px 14px;border-radius:6px}
.pd-empid{font-family:monospace;font-size:13px;color:var(--text-light);flex:0 0 60px}
.pd-name2{flex:1;font-weight:600}
.pd-name2 em{font-style:normal;font-weight:400;color:var(--text-light);font-size:13px}
.pd-role{font-size:12px;color:var(--brand);background:#eef2ff;padding:2px 8px;border-radius:10px;flex:0 0 auto}
.pd-item.is-sup .pd-role{background:var(--ok);color:#fff}
.personnel-actions{margin-top:16px;display:flex;flex-direction:column;gap:10px}
.hint{text-align:center;color:var(--text-light);font-size:13px;padding:10px}

/* 主管工具栏 */
.sup-tools{margin-bottom:16px;display:flex;gap:8px;flex-wrap:wrap}
.sup-tools .btn{flex:1;font-size:14px;padding:10px 14px}

/* v5: 员工缩略图+重新上传 */
.thumb{display:block;width:100%;max-width:200px;height:auto;margin-top:8px;border-radius:8px;border:1px solid #e5e7eb}
.reupload-btn{margin-top:6px;padding:6px 12px;font-size:13px;background:transparent;border:1px dashed #9ca3af;color:var(--text-light);border-radius:6px;cursor:pointer}
.reupload-btn:active{background:#f9fafb}
.backup-banner{padding:10px 14px;background:#eef2ff;border:1px solid var(--brand);border-radius:10px;color:var(--brand);font-size:14px;margin-bottom:12px;font-weight:500}

/* v5: 主管两照片徽章+缩略图 */
.photo-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.photo-badge{display:inline-block;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:500}
.photo-badge.done{background:var(--ok);color:#fff}
.photo-badge.pending{background:var(--danger);color:#fff}
.thumbs{display:flex;gap:8px;margin-top:6px}
.row-thumb{width:48px;height:48px;object-fit:cover;border-radius:6px;border:1px solid #e5e7eb;cursor:pointer}
.row-thumb:hover{border-color:var(--brand)}
.checkin-incomplete{
  margin-top:14px;padding:16px;border-radius:10px;
  background:var(--danger);color:#fff;text-align:center;font-weight:600;
}

/* ===== v6: 空调点位区(员工/主管) ===== */
.ac-section{margin-top:16px}
.ac-section-title{font-size:17px;font-weight:600;margin-bottom:10px;padding-left:4px}
.ac-closed-list{margin-top:12px}
.ac-closed-empty{margin-top:12px;padding:14px;text-align:center;color:var(--text-light);font-size:14px;background:#f9fafb;border-radius:10px}
.ac-pick-row{
  padding:16px 14px;border:1px solid #e5e7eb;border-radius:10px;margin-bottom:10px;
  cursor:pointer;transition:all .15s;background:var(--surface);
}
.ac-pick-row:hover{border-color:var(--brand);background:#f3eeff}
.ac-pick-row:active{transform:scale(0.98)}
.ac-pick-name{font-size:16px;font-weight:600;margin-bottom:4px}
.ac-pick-hint{font-size:13px;color:var(--text-light)}
.ac-info{font-size:14px;color:var(--text-light);margin-top:4px}
.ac-owner{margin-left:8px;font-size:12px;color:var(--text-light)}

/* ===== v5: 人员管理 (表格+筛选+操作) ===== */
.filter-bar{
  display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px;
}
.filter-bar .ipt{flex:1;min-width:120px;padding:12px;font-size:15px}
.filter-bar select.ipt{flex:0 0 auto;max-width:140px}
.personnel-table{
  background:#fff;border-radius:10px;box-shadow:var(--shadow);
  overflow:hidden;margin-bottom:16px;
}
.personnel-row{
  display:grid;
  grid-template-columns:80px 1.2fr 1fr 0.8fr 0.8fr 1.6fr;
  gap:8px;padding:12px 10px;border-bottom:1px solid #f0f0f0;
  font-size:14px;align-items:center;
}
.personnel-row:last-child{border-bottom:none}
.personnel-row.personnel-head{
  background:#f5f6f8;font-weight:600;color:var(--text);
  font-size:13px;border-bottom:1px solid #e5e7eb;
}
.personnel-row .pc{min-width:0;word-break:break-word}
.pc-empid{font-family:monospace;color:var(--text-light);font-size:13px}
.pc-name{font-weight:600}
.pc-name em{font-style:normal;font-weight:400;color:var(--text-light);font-size:13px;margin-left:4px}
.pc-dept,.pc-role,.pc-status{font-size:14px;color:var(--text)}
.pc-role{
  color:var(--brand);background:#eef2ff;padding:2px 8px;
  border-radius:10px;font-size:12px;display:inline-block;width:fit-content;
}
.personnel-actions{
  display:flex;gap:6px;flex-wrap:wrap;align-items:center;
}
.pa-btn{
  padding:8px 10px;font-size:13px;border-radius:6px;
  border:1px solid #d1d5db;background:#fff;cursor:pointer;
  font-weight:500;
}
.pa-btn:active{transform:scale(0.97);background:#f9fafb}
.pa-btn:disabled{opacity:.5;cursor:not-allowed}
.personnel-footer{
  margin-top:16px;display:flex;flex-direction:column;gap:10px;
}

/* 空调点位表 (与人员表共用,但列稍宽) */
.acpoints-table .personnel-row{
  grid-template-columns:60px 1.2fr 1fr 1.2fr 1.2fr 1.4fr;
}
.pc-owner{font-weight:500;font-size:14px}

/* 模态框表单 */
.modal-form{display:flex;flex-direction:column;gap:6px}
.mf-label{font-size:13px;color:var(--text-light);margin-top:6px;margin-bottom:2px}
.mf-label:first-child{margin-top:0}
.mf-check{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text);margin-top:8px;cursor:pointer}
.mf-check input{width:18px;height:18px}
.mf-result{font-size:14px;color:var(--text);margin:6px 0;line-height:1.6}
.mf-result code{
  font-family:monospace;font-size:16px;background:#eef2ff;color:var(--brand);
  padding:4px 10px;border-radius:6px;font-weight:600;
}
.mf-hint{font-size:13px;color:var(--text-light);margin-top:6px;line-height:1.5}
.mf-pointlist{
  margin:10px 0;padding:10px;background:#f5f6f8;border-radius:8px;
  display:flex;flex-direction:column;gap:6px;
}
.mf-pointlist > div{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px}

/* 移动端表格优化 */
@media(max-width:600px){
  .personnel-row{
    grid-template-columns:1fr;
    gap:4px;padding:14px 10px;
  }
  .personnel-row.personnel-head{display:none}
  .personnel-row{
    border:1px solid #e5e7eb;border-radius:8px;margin-bottom:8px;
  }
  .personnel-row .pc-empid{font-size:12px;color:var(--text-light)}
  .personnel-row .pc-name{font-size:16px}
  .personnel-row .pc-role{margin-top:2px}
  .personnel-actions{margin-top:6px}
  .pa-btn{flex:1;min-width:0;padding:10px 6px}
  .filter-bar .ipt{flex:1 1 100%}
  .filter-bar select.ipt{max-width:none}
}

/* ===== 登录页简化版(部门→姓名→6位密码→30天免登录) ===== */
#login-page{flex-direction:column;align-items:center;justify-content:center;padding:16px;background:var(--bg)}
.lg-view{
  display:none;flex-direction:column;
  background:var(--surface);border-radius:18px;
  padding:24px 20px;max-width:440px;width:100%;margin:0 auto;
  box-shadow:0 2px 16px rgba(0,0,0,0.05);box-sizing:border-box;
}
.lg-view[style*="block"]{display:flex}
/* 首页: 品牌区 + 部门卡 + 底部入口 */
.lg-home{padding:28px 20px 20px}
.lg-brand{text-align:center;margin-bottom:22px}
.lg-brand-title{font-size:28px;font-weight:700;color:#1e3a5f;letter-spacing:1px}
.lg-brand-sub{font-size:14px;color:var(--text-light);margin-top:4px}
.lg-brand-date{font-size:13px;color:var(--text-light);margin-top:6px}
.lg-section-label{font-size:15px;color:#1e3a5f;font-weight:600;margin-bottom:12px;text-align:center}
.lg-dept-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.lg-dept-btn{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  min-height:72px;padding:14px 10px;
  background:var(--surface);border:1.5px solid #1e3a5f;border-radius:14px;
  color:#1e3a5f;font-size:17px;font-weight:600;cursor:pointer;
  transition:transform .1s,background .12s;-webkit-tap-highlight-color:transparent;
}
.lg-dept-btn:active{transform:scale(0.97);background:#f0f4f8}
.lg-dept-icon{width:28px;height:28px;stroke:#1e3a5f;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.lg-dept-name{font-size:17px;font-weight:600}
.lg-footer{text-align:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb}
.lg-mgr-link{
  background:none;border:none;cursor:pointer;
  color:var(--text-light);font-size:14px;text-decoration:underline;
  padding:6px 10px;
}
.lg-mgr-link:active{color:#1e3a5f}
/* 通用: 头部返回 */
.lg-head{display:flex;align-items:center;gap:10px;padding-bottom:14px;border-bottom:1px solid #e5e7eb;margin-bottom:14px}
.lg-back{background:none;border:none;font-size:16px;color:#1e3a5f;cursor:pointer;padding:6px 8px;font-weight:500}
.lg-head-title{font-size:18px;font-weight:600;color:#1e3a5f}
/* 员工列表 */
.lg-search-wrap{margin-bottom:14px}
.lg-search{width:100%;padding:13px 14px;font-size:16px;border:1px solid #d1d5db;border-radius:10px;box-sizing:border-box;background:var(--surface)}
.lg-search:focus{border-color:#1e3a5f;outline:none}
.lg-staff-list{display:flex;flex-direction:column;gap:10px}
.lg-name-btn{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:16px 16px;font-size:18px;font-weight:500;
  border:1px solid #e5e7eb;border-radius:12px;
  background:var(--surface);color:var(--text);cursor:pointer;transition:all .12s;
}
.lg-name-btn:active{transform:scale(0.99);border-color:#1e3a5f}
.lg-name-text{flex:1;text-align:left}
.lg-nick{font-size:14px;color:var(--text-light);font-weight:400}
.lg-sup-tag{font-size:12px;color:#fff;background:#1e3a5f;padding:3px 10px;border-radius:999px;white-space:nowrap}
.lg-loading{text-align:center;color:var(--text-light);padding:24px}
/* 6位密码键盘 */
.lg-pin-body{display:flex;flex-direction:column;align-items:center;gap:14px;padding:8px 0 24px}
.lg-pin-name{font-size:20px;font-weight:600;color:#1e3a5f;text-align:center;margin-bottom:4px}
.lg-pin-hint{font-size:13px;color:var(--text-light);text-align:center;margin-bottom:8px}
.lg-pin-dots{display:flex;gap:14px;margin:8px 0}
.lg-pin-dots .dot{width:16px;height:16px;border-radius:50%;border:2px solid #d1d5db;background:transparent;transition:all .12s}
.lg-pin-dots .dot.filled{background:#1e3a5f;border-color:#1e3a5f}
.lg-pin-err{color:var(--danger);font-size:14px;min-height:20px;text-align:center}
.lg-numpad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%;max-width:300px;margin-top:8px}
.lg-numpad .np{
  padding:18px 0;font-size:24px;font-weight:600;
  border:1px solid #e5e7eb;border-radius:14px;
  background:var(--surface);color:var(--text);cursor:pointer;user-select:none;transition:background .1s;
}
.lg-numpad .np:active{background:#f0f4f8}
.lg-numpad .np-blank{visibility:hidden}
.lg-numpad .np-del{color:var(--danger);border-color:#e5e7eb;font-size:24px}
.lg-remember{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text);margin-top:16px;cursor:pointer}
.lg-remember input{width:20px;height:20px}
/* 账号登录 */
.lg-mgr .login-form{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.lg-mgr .login-err{margin-top:6px}
/* 首次改密 */
.lg-changepw-body{padding:8px 0}
.lg-changepw-hint{font-size:14px;color:var(--text-light);text-align:center;margin-bottom:14px}
.lg-changepw-body .login-form{margin-top:6px}
@media(max-width:480px){
  #login-page{padding:12px}
  .lg-view{padding:20px 16px;border-radius:16px}
  .lg-home{padding:24px 16px 18px}
  .lg-brand-title{font-size:26px}
  .lg-dept-grid{gap:10px}
  .lg-dept-btn{min-height:68px;padding:12px 8px;font-size:16px}
  .lg-dept-icon{width:24px;height:24px}
  .lg-name-btn{padding:14px 14px;font-size:17px}
  .lg-numpad .np{padding:16px 0;font-size:22px}
}

/* ===== 现场摄像头拍摄层 ===== */
.camera-overlay{
  position:fixed;inset:0;z-index:9999;background:#000;
  display:flex;align-items:center;justify-content:center;
}
.camera-container{
  width:100%;max-width:500px;height:100%;max-height:100vh;
  display:flex;flex-direction:column;background:#000;position:relative;
}
.cam-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;background:#111;color:#fff;flex-shrink:0;
}
.cam-close{background:none;border:none;color:#fff;font-size:16px;cursor:pointer;}
.cam-title{font-size:16px;font-weight:600;}
#cam-video{
  flex:1;width:100%;object-fit:cover;background:#000;
}
.cam-preview{
  flex:1;width:100%;object-fit:contain;background:#000;
}
.cam-actions{
  display:flex;gap:12px;padding:16px;background:#111;flex-shrink:0;justify-content:center;
}
.cam-capture-btn{
  width:72px;height:72px;border-radius:50%;border:4px solid #fff;
  background:var(--brand);color:#fff;font-size:13px;font-weight:600;cursor:pointer;
}
.cam-retake{flex:1;}
.cam-confirm{flex:1;}
.cam-error{
  flex:1;padding:24px;color:#fff;display:flex;flex-direction:column;gap:12px;justify-content:center;
}
.cam-error-title{font-size:20px;font-weight:700;color:#f87171;}
.cam-error-msg{font-size:14px;color:#d1d5db;line-height:1.6;}
.cam-wx-hint{font-size:13px;color:#fbbf24;margin-top:8px;}

/* 异常/疑似标记(橙色) */
.photo-badge.exception{background:#f59e0b;color:#fff;}
.photo-badge.suspect{background:#f97316;color:#fff;}

/* ===== 历史记录页面 ===== */
.hist-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.hist-title{font-size:18px;font-weight:700;color:var(--text);}
.hist-quick{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;}
.hist-quick .btn{font-size:13px;padding:6px 12px;}
.hist-range-title{font-size:14px;color:var(--text-light);margin-bottom:8px;}
.hist-day-row{display:flex;align-items:center;justify-content:space-between;
  padding:12px 14px;background:#fff;border-radius:10px;margin-bottom:8px;
  border-left:4px solid var(--gray);cursor:pointer;}
.hist-day-row.green{border-left-color:#16a34a;}
.hist-day-row.red{border-left-color:#dc2626;}
.hist-day-row.yellow{border-left-color:#f59e0b;}
.hist-day-row.gray{border-left-color:#9ca3af;}
.day-date{font-weight:600;color:var(--text);}
.day-status{font-size:13px;color:var(--text-light);flex:1;margin-left:12px;}
.day-arrow{color:var(--text-light);font-size:20px;}
.hist-store-card{padding:16px;border-radius:12px;margin-bottom:16px;text-align:center;
  background:#f0fdf4;border:2px solid #16a34a;}
.hist-store-card.red{background:#fef2f2;border-color:#dc2626;}
.hist-store-card.yellow{background:#fffbeb;border-color:#f59e0b;}

/* ===== ICP备案号页脚(全局固定, 未登录也可见) ===== */
#icp-footer{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  text-align:center;padding:7px 8px calc(7px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.94);border-top:1px solid #eee;
  font-size:12px;line-height:1.4;
}
#icp-footer a{color:#9ca3af;text-decoration:none;}
#icp-footer a:active{color:#6b7280;}
/* 避免固定页脚遮挡内容 */
.login-wrap{padding-bottom:56px;}
.view{padding-bottom:70px !important;}
.hist-store-card.gray{background:#f3f4f6;border-color:#9ca3af;}
.hist-store-card .store-label{font-size:13px;color:var(--text-light);}
.hist-store-card .store-text{font-size:20px;font-weight:700;margin:6px 0;}
.hist-store-card .store-meta{font-size:12px;color:var(--text-light);}
.hist-dept-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px;}
.hist-dept-card{padding:12px;border-radius:10px;background:#fff;border:2px solid var(--gray);cursor:pointer;}
.hist-dept-card.green{border-color:#16a34a;}
.hist-dept-card.red{border-color:#dc2626;}
.hist-dept-card.yellow{border-color:#f59e0b;}
.hist-dept-card.gray{border-color:#9ca3af;}
.hdc-name{font-weight:700;margin-bottom:4px;}
.hdc-stats{font-size:12px;color:var(--text-light);}
.hdc-ex{font-size:12px;color:#f59e0b;margin:2px 0;}
.hdc-sub{font-size:11px;color:var(--text-light);margin-top:4px;}
.hist-staff-row,.hist-ac-row{padding:10px;background:#f9fafb;border-radius:8px;margin-bottom:8px;}
.hsr-name,.har-name{font-weight:600;margin-bottom:4px;}
.hsr-name.green,.har-name.green{color:#16a34a;}
.hsr-name.red,.har-name.red{color:#dc2626;}
.hsr-name.gray,.har-name.gray{color:#9ca3af;}
.hsr-dept{font-size:11px;color:var(--text-light);font-weight:normal;}
.hsr-status,.har-status{font-size:13px;margin-bottom:4px;}
.hsr-meta,.har-meta{font-size:12px;color:var(--text-light);margin:2px 0;}
.hsr-meta.warn,.har-meta.warn{color:#f59e0b;}
.photo-cleaned{padding:8px;background:#fef3c7;color:#92400e;border-radius:6px;font-size:12px;text-align:center;}
.no-photo{padding:8px;background:#f3f4f6;color:#6b7280;border-radius:6px;font-size:12px;text-align:center;}
.corr-note{font-size:12px;color:#6b7280;background:#f3f4f6;padding:4px 8px;border-radius:4px;margin-top:4px;}
.btn-sm{font-size:13px;padding:6px 12px;}
