/* 水务维修 PC 管理后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px; color: #24313f; background: #f0f3f7;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
  font-family: inherit; font-size: 14px; padding: 8px 10px;
  border: 1px solid #cdd6e0; border-radius: 6px; outline: none; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: #2f6fed; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 8px 16px; border: none; border-radius: 6px; font-size: 14px;
  background: #e8edf3; color: #2b3a4b; transition: filter .15s;
}
.btn:hover { filter: brightness(.96); }
.btn-primary { background: #2f6fed; color: #fff; }
.btn-success { background: #21a35d; color: #fff; }
.btn-danger  { background: #e5484d; color: #fff; }
.btn-warn    { background: #f59f0a; color: #fff; }
.btn-ghost   { background: transparent; color: #5b6b7b; border: 1px solid #cdd6e0; }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 5px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16324f 0%, #1f5aa8 100%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 14px; padding: 38px 36px 30px;
  box-shadow: 0 18px 50px rgba(8, 30, 60, .35); text-align: center;
}
.login-logo { font-size: 46px; }
.login-card h1 { font-size: 19px; margin: 10px 0 6px; color: #16324f; }
.login-sub { font-size: 12.5px; color: #8393a5; margin-bottom: 24px; }
.login-form input { width: 100%; margin-bottom: 14px; }
.login-msg { color: #e5484d; font-size: 13px; min-height: 18px; margin: 4px 0; }
.login-tip { color: #9aa8b6; font-size: 12px; margin-top: 10px; }

/* ---------- 主布局 ---------- */
.app-wrap { display: flex; height: 100vh; }
.sidebar {
  width: 215px; flex-shrink: 0; background: #16324f; color: #c8d5e4;
  display: flex; flex-direction: column;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-icon { font-size: 26px; }
.brand-title { font-size: 16px; font-weight: 600; color: #fff; }
.brand-sub { font-size: 11.5px; color: #7f93a8; margin-top: 2px; }
nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item {
  display: block; padding: 11px 14px; margin: 3px 0; border-radius: 8px;
  color: #c8d5e4; cursor: pointer; font-size: 14px; transition: background .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.active { background: #2f6fed; color: #fff; font-weight: 500; }
.nav-badge {
  float: right; background: #e5484d; color: #fff; border-radius: 9px;
  font-size: 11px; padding: 1px 7px; margin-left: 4px;
}
.sidebar-foot { padding: 14px 18px; font-size: 11.5px; color: #5f7288; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 26px;
  box-shadow: 0 1px 4px rgba(20, 40, 70, .08); z-index: 5;
}
.topbar h2 { font-size: 17px; color: #16324f; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.top-user { color: #5b6b7b; font-size: 13.5px; }
.content { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }

/* ---------- 卡片 / 表格 ---------- */
.card {
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(20, 40, 70, .06); margin-bottom: 18px;
}
.card h3 { font-size: 15px; color: #16324f; margin-bottom: 14px; }
.card-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head-row h3 { margin-bottom: 0; }
.head-btns { display: flex; gap: 8px; align-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-item { background: #fff; border-radius: 10px; padding: 18px; text-align: center; box-shadow: 0 1px 4px rgba(20,40,70,.06); }
.stat-num { font-size: 30px; font-weight: 700; color: #16324f; }
.stat-label { font-size: 12.5px; color: #7b8a99; margin-top: 4px; }
.stat-item.hl .stat-num { color: #2f6fed; }
.stat-item.warn .stat-num { color: #f59f0a; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 10px; text-align: left; border-bottom: 1px solid #eef2f6; font-size: 13.5px; }
.tbl th { color: #7b8a99; font-weight: 500; background: #f8fafc; white-space: nowrap; }
.tbl tr:hover td { background: #f8fbff; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-empty { text-align: center; color: #9aa8b6; padding: 26px 0; }

/* ---------- 徽标 ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.st-待派发 { background: #eef1f5; color: #5b6b7b; }
.st-已派发 { background: #e8f0fe; color: #2f6fed; }
.st-进行中 { background: #fff3e0; color: #d97a06; }
.st-待验收 { background: #f3e8ff; color: #7c3aed; }
.st-已完成 { background: #e5f6ec; color: #178a4c; }
.st-已驳回 { background: #fdecec; color: #c53030; }
.st-待审核 { background: #fff3e0; color: #d97a06; }
.st-已转工单 { background: #e8f0fe; color: #2f6fed; }
.st-已关闭 { background: #eef1f5; color: #8393a5; }
.st-待验收完成 { background: #f3e8ff; color: #7c3aed; }
.st-已验收 { background: #e5f6ec; color: #178a4c; }
.pri-特急 { background: #fdecec; color: #e5484d; }
.pri-紧急 { background: #fff3e0; color: #d97a06; }
.pri-一般 { background: #eef1f5; color: #5b6b7b; }
.lv-重要 { background: #fdecec; color: #e5484d; }
.lv-普通 { background: #eef1f5; color: #5b6b7b; }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  padding: 6px 14px; border-radius: 16px; background: #eef1f5; color: #5b6b7b;
  border: none; font-size: 13px;
}
.filter-chip.active { background: #2f6fed; color: #fff; }
.fl-label { font-size: 13px; color: #5b6b7b; align-self: center; }
.fl-sel { padding: 6px 10px; border-radius: 8px; border: 1px solid #d7dde5; background: #fff; color: #16324f; font-size: 13px; }
.fl-tip { font-size: 12px; color: #9aa7b4; align-self: center; }
.ov-sum { margin: 10px 0 4px; padding: 8px 12px; background: #f3f7ff; border: 1px solid #dbe6fb; border-radius: 8px; font-size: 13px; color: #2b4a73; }
.ov-sum .done { color: #1a9d57; }
.ov-sum .undone { color: #e0533d; }

/* ---------- 任务下钻 ---------- */
.task-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .task-grid { grid-template-columns: 1fr; } }
.task-col { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(20,40,70,.06); padding: 16px; }
.task-col h3 { font-size: 14.5px; color: #16324f; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.task-item { border: 1px solid #e6ecf3; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.task-item:hover { border-color: #2f6fed; }
.task-item.selected { border-color: #2f6fed; background: #f3f8ff; }
.task-item .t-title { font-weight: 500; font-size: 13.5px; }
.task-item .t-meta { color: #8393a5; font-size: 12px; margin-top: 4px; line-height: 1.5; }

/* ---------- 审批卡片 ---------- */
.appr-card { border: 1px solid #e6ecf3; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.appr-card .a-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.appr-card .a-title { font-weight: 600; font-size: 14px; }
.appr-card .a-desc { color: #4a5a6a; font-size: 13.5px; line-height: 1.6; margin: 6px 0; }
.appr-card .a-meta { color: #8393a5; font-size: 12px; margin-bottom: 10px; }
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.photo-row .ph-label { width: 100%; font-size: 12px; color: #8393a5; }
.photo-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 6px;
  border: 1px solid #e0e6ee; cursor: zoom-in; background: #f2f5f9;
}
.appr-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- 公告 ---------- */
.announce-item { border-left: 3px solid #cdd6e0; padding: 10px 14px; margin-bottom: 10px; }
.announce-item.lv-重要 { border-left-color: #e5484d; }
.announce-item .a-title { font-weight: 600; }
.announce-item .a-content { color: #4a5a6a; margin: 4px 0; line-height: 1.6; }
.announce-item .a-meta { color: #9aa8b6; font-size: 12px; }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 13px; }
.form-row label { display: block; font-size: 13px; color: #5b6b7b; margin-bottom: 5px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; }
.form-row textarea { min-height: 72px; resize: vertical; }
.check-group { display: flex; gap: 14px; flex-wrap: wrap; padding: 4px 0; }
.check-group label { display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: #2b3a4b; }
.check-group input { width: auto; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 30, 50, .5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: #fff; border-radius: 12px; width: 520px; max-width: 94vw;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(10, 30, 60, .3);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 20px; border-bottom: 1px solid #eef2f6; font-size: 15.5px; font-weight: 600; color: #16324f;
}
.modal-close { border: none; background: none; font-size: 22px; color: #9aa8b6; line-height: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }

/* ---------- 图片预览 ---------- */
.img-mask {
  position: fixed; inset: 0; background: rgba(10, 20, 35, .82);
  display: flex; align-items: center; justify-content: center; z-index: 200; cursor: zoom-out;
}
.img-mask img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  background: #16324f; color: #fff; padding: 10px 22px; border-radius: 8px;
  z-index: 300; font-size: 14px; box-shadow: 0 8px 24px rgba(10, 30, 60, .25);
}
.toast.err { background: #c53030; }

/* ---------- 导出 ---------- */
.month-pick { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.report-sec { margin-bottom: 18px; }
.report-sec h4 { font-size: 14px; color: #16324f; margin-bottom: 8px; }
.kv-list { display: flex; gap: 10px; flex-wrap: wrap; }
.kv-item { background: #f8fafc; border-radius: 8px; padding: 8px 14px; font-size: 13px; }
.kv-item b { color: #16324f; }

/* ---------- 积分规则配置 ---------- */
.rule-note { font-size: 13px; color: #6a7d92; line-height: 1.7; margin-bottom: 14px; }
.rule-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 22px; }
.rule-col h4 { font-size: 14px; color: #16324f; margin-bottom: 10px; }
.rule-col .form-row input[type=number] { max-width: 200px; }
.field-hint { display: block; font-size: 12px; color: #97a6b6; margin-top: 4px; }
.rule-preview {
  background: #f8fafc; border-radius: 8px; padding: 12px 16px;
  font-size: 13.5px; color: #35506c; line-height: 2; margin-bottom: 10px;
}
.rule-preview b { color: #16324f; }
.rule-preview b.neg { color: #c53030; }
@media (max-width: 900px) { .rule-grid { grid-template-columns: 1fr; } }

/* ---------- 工单类型快捷选项（按部门） ---------- */
.wt-editor { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.wt-editor select { min-width: 180px; }
.wt-editor input { flex: 1; min-width: 160px; padding: 8px 12px; border: 1px solid #d7e0ea; border-radius: 8px; font-size: 13.5px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef5fb; color: #0b6fb8; border: 1px solid #cfe2f2;
  border-radius: 16px; padding: 6px 14px; font-size: 13.5px;
}
.chip.wt { background: #eef7ee; color: #2f8a3b; border-color: #cfe9d2; }
.chip .chip-x {
  cursor: pointer; color: #b04a4a; font-weight: 700; line-height: 1;
  padding: 0 2px; border-radius: 50%; user-select: none;
}
.chip .chip-x:hover { background: #f3d3d3; }
/* 快捷选项可改名（2026-10-21）：点文字或 ✎ 就地编辑，默认项也能改 */
.chip .chip-l { cursor: pointer; }
.chip .chip-l:hover { text-decoration: underline dotted; }
.chip .chip-e {
  cursor: pointer; color: #4a7fb0; font-weight: 700; line-height: 1;
  padding: 0 2px; border-radius: 50%; user-select: none;
}
.chip .chip-e:hover { background: #dbe8f5; }
.chip-in {
  min-width: 140px; padding: 5px 12px; border: 1px solid #9fc4e6; border-radius: 16px;
  font-size: 13.5px; color: #2f8a3b; background: #fff; outline: none;
}

/* ---------- 部门管理员 / 班组长 职位设置 ---------- */
.adm-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; max-height: 320px; overflow: auto; }
.adm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f6f9fc; border: 1px solid #e3ebf3; border-radius: 8px; padding: 8px 10px; }
.adm-chk { display: flex; align-items: center; gap: 6px; min-width: 200px; font-size: 13.5px; }
.adm-pos, .adm-title, .lead-pos {
  flex: 1; min-width: 130px; padding: 7px 10px; border: 1px solid #d7e0ea; border-radius: 8px; font-size: 13.5px;
}
.adm-title { max-width: 160px; }

/* ---------- 值班大屏（深色全幅实时看板） ---------- */
.content.screen-view { background: #0b1622; padding: 18px 22px 34px; }
.scr { min-height: 100%; color: #eaf4ff; }
.scr-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 4px 4px 18px; }
.scr-title { font-size: 24px; font-weight: 800; letter-spacing: 1px; color: #eaf4ff; }
.scr-sub { font-size: 12.5px; color: #6d8299; margin-top: 6px; }
.scr-right { text-align: right; }
.scr-clock { font-size: 20px; font-weight: 700; color: #4fc3f7; font-variant-numeric: tabular-nums; }
.scr-upd { font-size: 12px; color: #56718c; margin-top: 5px; }
.scr-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.scr-tile { background: #13263a; border: 1px solid #1d3a55; border-radius: 12px; padding: 16px 8px; text-align: center; }
.scr-v { font-size: 38px; font-weight: 800; color: #eaf4ff; font-variant-numeric: tabular-nums; line-height: 1.15; }
.scr-k { font-size: 12.5px; color: #7d94aa; margin-top: 6px; }
.scr-tile.warn .scr-v { color: #ffb74d; }
.scr-tile.amber .scr-v { color: #ffa726; }
.scr-tile.ok .scr-v { color: #4ade80; }
.scr-tile.hl .scr-v { color: #4fc3f7; }
.scr-tile.bad .scr-v { color: #ff6b6b; }
.scr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.scr-panel { background: #13263a; border-radius: 12px; padding: 18px 20px; }
.scr-ph { font-size: 14px; font-weight: 700; color: #9fd8ff; margin-bottom: 12px; }
.scr-empty { font-size: 13px; color: #5d7590; padding: 10px 0; }
.scr-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #1b3145; }
.scr-row:last-child { border-bottom: 0; }
.scr-n { flex: 1; font-size: 14px; color: #dbe9f7; }
.scr-n.warn { color: #ffb74d; font-weight: 700; }
.scr-t { font-size: 12px; color: #5d7590; margin-left: 14px; }
.scr-c { font-size: 18px; font-weight: 800; color: #4fc3f7; margin-left: 16px; font-variant-numeric: tabular-nums; }
.scr-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.scr-tag { font-size: 13px; font-weight: 700; color: #0b1622; background: #4fc3f7; border-radius: 999px; padding: 5px 14px; }
@media (max-width: 1280px) { .scr-grid { grid-template-columns: repeat(4, 1fr); } .scr-cols { grid-template-columns: 1fr; } }

/* ---------- 工单明细打印单 ----------
   页面里常驻一个隐藏的 #printRoot，点「打印」时注入内容并给 body 加 .printing，
   打印时只显示它、隐藏其余一切；浏览器「另存为 PDF」即可导出归档件。 */
#printRoot { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing > *:not(#printRoot) { display: none !important; }
  #printRoot { display: block !important; }
  .p-photos img { max-height: 42mm; }
}
#printRoot .p-page { color: #111; font-size: 12px; line-height: 1.6; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
#printRoot .p-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 2px solid #111; padding-bottom: 6px; }
#printRoot .p-title { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
#printRoot .p-sub { font-size: 11px; color: #555; }
#printRoot .p-no { font-size: 16px; font-weight: 700; margin: 12px 0 8px; }
#printRoot .p-tag { display: inline-block; border: 1px solid #666; border-radius: 3px; font-size: 11px; font-weight: 400; padding: 1px 6px; margin-left: 8px; vertical-align: middle; }
#printRoot .p-sec { font-size: 13px; font-weight: 700; margin: 16px 0 6px; padding-left: 7px; border-left: 3px solid #111; }
#printRoot .p-empty { color: #777; font-size: 12px; padding: 4px 0; }
#printRoot table { width: 100%; border-collapse: collapse; }
#printRoot .p-kv th { width: 92px; text-align: left; font-weight: 600; background: #f2f2f2; }
#printRoot .p-kv th, #printRoot .p-kv td { border: 1px solid #999; padding: 5px 8px; vertical-align: top; }
#printRoot .p-tl th, #printRoot .p-tl td { border: 1px solid #999; padding: 5px 8px; vertical-align: top; font-size: 11.5px; }
#printRoot .p-tl th { background: #f2f2f2; font-weight: 600; text-align: left; }
#printRoot .p-nowrap { white-space: nowrap; }
#printRoot .p-block { border: 1px solid #999; margin-bottom: 8px; }
#printRoot .p-block-h { background: #f2f2f2; font-weight: 600; font-size: 12px; padding: 5px 8px; border-bottom: 1px solid #999; }
#printRoot .p-block-b { padding: 6px 8px; }
#printRoot .p-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#printRoot .p-photos img { max-width: 31%; max-height: 60mm; border: 1px solid #bbb; object-fit: contain; }
#printRoot .p-sign img { max-height: 32mm; border: 1px solid #bbb; }
#printRoot .p-foot { margin-top: 26px; }
#printRoot .p-signline { margin-top: 14px; font-size: 12.5px; }

