/* 汪总活动设备管理系统原型 · PC端共享样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #1f2937; background: #f5f7fa; font-size: 14px; line-height: 1.6;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px; flex-shrink: 0; color: #dbe4f5; padding: 18px 0;
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 130%);
  display: flex; flex-direction: column;
}
.logo { font-size: 16px; font-weight: 700; color: #fff; padding: 6px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.15); }
.logo small { display: block; font-size: 11px; font-weight: 400; color: #b5c6ee; margin-top: 2px; }
.menu-item { display: block; padding: 8px 20px; color: #cdd9f0; font-size: 13px; border-left: 3px solid transparent; }
.menu-group { padding: 13px 20px 3px; font-size: 11px; color: #8fa5d3; letter-spacing: 2px; }
.menu-item:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.menu-item.active { color: #fff; background: rgba(255,255,255,.14); border-left-color: #ffd166; font-weight: 700; }
.sidebar .back-link { margin-top: auto; padding: 14px 20px; font-size: 12px; color: #9db3e0; }
/* 侧边栏可向左折叠：收起后成图标窄条，图标/文字由 app.js 运行时拆分，状态在同一标签页内记忆 */
.sidebar { transition: width .18s ease; min-width: 0; overflow-x: hidden; }
.sidebar .logo, .sidebar .menu-group, .sidebar .menu-item, .sidebar .back-link { white-space: nowrap; }
/* 折叠按钮在顶栏面包屑左侧；无顶栏的页面兼容回侧栏内，用 .in-side */
.side-fold {
  flex-shrink: 0; width: 26px; height: 26px; line-height: 24px; text-align: center;
  border-radius: 6px; border: 1px solid #d5dcea; background: #fff; color: #4b5563;
  font-size: 14px; cursor: pointer; user-select: none;
}
.side-fold:hover { background: #eef4ff; border-color: #b9cbf0; color: #1e40af; }
.side-fold.in-side { align-self: flex-end; margin: 6px 12px 2px 0; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #dbe4f5; }
.side-fold.in-side:hover { background: rgba(255,255,255,.2); color: #fff; }
.side-ico { font-style: normal; margin-right: 9px; }
body.side-mini .sidebar { width: 60px; }
body.side-mini .logo { font-size: 0; text-align: center; padding: 6px 0 14px; }
body.side-mini .logo small { display: none; }
body.side-mini .logo::before { content: "汪"; font-size: 17px; }
body.side-mini .menu-group { font-size: 0; padding: 9px 14px; letter-spacing: 0; }
body.side-mini .menu-group::before { content: ""; display: block; height: 1px; background: rgba(255,255,255,.16); }
body.side-mini .menu-item { padding: 9px 0; text-align: center; }
body.side-mini .menu-item .side-txt, body.side-mini .back-link .side-txt { display: none; }
body.side-mini .menu-item .side-ico, body.side-mini .back-link .side-ico { margin-right: 0; }
body.side-mini .sidebar .back-link { padding: 14px 0; text-align: center; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 52px; background: #fff; border-bottom: 1px solid #e5e9f0;
  display: flex; align-items: center; padding: 0 22px; gap: 8px;
}
.crumb { font-size: 15px; font-weight: 700; }
.userbox { margin-left: auto; font-size: 13px; color: #4b5563; }
.userbox b { color: #1f2937; }
.avatar { display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: #2563eb; color: #fff; text-align: center; line-height: 28px; font-size: 12px; margin-right: 6px; vertical-align: middle; }
.main { padding: 20px 22px 40px; }
.grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 16px 18px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.card-title .dot { width: 8px; height: 8px; border-radius: 2px; background: #2563eb; margin-right: 8px; }
.card-title .link { margin-left: auto; font-size: 12px; font-weight: 400; }

/* ---------- KPI ---------- */
.kpi { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 16px 18px; }
.kpi-num { font-size: 26px; font-weight: 700; color: #1f2937; font-family: Consolas, "Microsoft YaHei", monospace; }
.kpi-label { font-size: 13px; color: #6b7280; margin-top: 2px; }
.kpi-sub { font-size: 12px; margin-top: 6px; color: #6b7280; }
.kpi a { color: inherit; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #f0f4fa; color: #4b5563; font-weight: 700; text-align: left; padding: 9px 10px; white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid #eef1f6; }
.table tbody tr:hover { background: #f7faff; }
.table .num, .table td.num { text-align: right; font-family: Consolas, "Microsoft YaHei", monospace; }
.table .total-row td { font-weight: 700; background: #f7f9fc; border-top: 2px solid #dbe3ef; }
.table a { font-weight: 600; }

/* ---------- 徽标 ---------- */
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.tag-green { background: #e7f6ec; color: #16a34a; }
.tag-yellow { background: #fef4e2; color: #b45309; }
.tag-red { background: #fdecec; color: #dc2626; }
.tag-gray { background: #eef1f5; color: #6b7280; }
.tag-blue { background: #e8f0fe; color: #2563eb; }

/* ---------- 进度条 / 横向条形图 ---------- */
.progress { background: #e9edf3; height: 8px; border-radius: 999px; overflow: hidden; min-width: 70px; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.progress.warn i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress.risk i { background: linear-gradient(90deg, #f87171, #dc2626); }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.bar-row .name { width: 170px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { flex: 1; background: #eef2f8; height: 14px; border-radius: 999px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #93c5fd, #2563eb); border-radius: 999px; }
.bar-row .val { width: 66px; text-align: right; font-weight: 700; font-family: Consolas, "Microsoft YaHei", monospace; }

/* ---------- 按钮 / 开关 / 筛选 ---------- */
.btn { display: inline-block; background: #2563eb; color: #fff !important; border: none; border-radius: 8px; padding: 7px 18px; font-size: 13px; cursor: pointer; }
.btn:hover { background: #1d4ed8; text-decoration: none; }
.btn-lg { display: block; width: 100%; text-align: center; padding: 11px; font-size: 15px; border-radius: 8px; }
.btn-ghost { display: inline-block; background: #fff; color: #2563eb !important; border: 1px solid #2563eb; border-radius: 8px; padding: 6px 14px; font-size: 13px; }
.btn-ghost:hover { background: #eef4ff; text-decoration: none; }
.btn-ghost-red { color: #dc2626 !important; border-color: #dc2626; }
.btn-ghost-red:hover { background: #fef2f2; }
.filterbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.select, .input { border: 1px solid #d6dbe4; border-radius: 8px; padding: 7px 12px; font-size: 13px; background: #fff; color: #374151; }
.select { min-width: 130px; }
.input { min-width: 220px; }
.right { margin-left: auto; }

.switch { display: inline-block; width: 40px; height: 22px; border-radius: 999px; background: #2563eb; position: relative; vertical-align: middle; }
.switch::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.off { background: #c3cad6; }
.switch.off::after { left: 3px; right: auto; }
.switch-txt { font-size: 12px; margin-left: 6px; color: #4b5563; }

/* ---------- 页签 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #e5eaf2; margin-bottom: 14px; }
.tab { padding: 8px 20px; font-size: 14px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; user-select: none; }
.tab.active { color: #2563eb; font-weight: 700; border-bottom-color: #2563eb; }
.tab-pane { display: none; }
.tab-pane.show { display: block; }

/* ---------- 弹层示意（静态） ---------- */
.modal-demo { background: #fff; border-radius: 12px; box-shadow: 0 6px 30px rgba(15,30,70,.25); padding: 20px 22px; position: relative; }
.modal-demo .close { position: absolute; right: 14px; top: 10px; color: #9ca3af; font-size: 18px; }
.modal-mask { background: rgba(17,24,39,.45); border-radius: 12px; padding: 30px; }

/* ---------- 流程步骤块 ---------- */
.flow-steps { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-step { background: #f2f6fd; border: 1px solid #dbe6f7; border-radius: 10px; padding: 10px 16px; text-align: center; min-width: 150px; }
.flow-step b { display: block; color: #1e3a8a; }
.flow-step span:not(.tag) { font-size: 12px; color: #6b7280; }
.flow-arrow { align-self: center; padding: 0 10px; color: #2563eb; font-size: 20px; font-weight: 700; }

/* ---------- 时间线 ---------- */
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid #dbe4f5; margin-left: 6px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #2563eb; }
.timeline li:last-child { border-left-color: transparent; }
.timeline .t { color: #9ca3af; font-size: 12px; margin-right: 8px; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #dbe7fb 0%, #f5f7fa 45%, #eaf1fd 100%); }
.login-card { width: 400px; background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(30,58,138,.14); padding: 34px 36px; }
.login-card h1 { font-size: 20px; color: #1e3a8a; }
.login-card .sub { font-size: 13px; color: #6b7280; margin: 4px 0 22px; }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 5px; }
.login-field input { width: 100%; border: 1px solid #d6dbe4; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.role-btns { display: flex; gap: 10px; margin-top: 14px; }
.role-btns a { flex: 1; text-align: center; }

/* ---------- 杂项 ---------- */
.muted { color: #6b7280; font-size: 12px; }
.sum-row td { background: #f7f9fc; font-weight: 700; font-size: 13px; border-top: 2px solid #dfe4ee; }
.hint-bar { background: #eef4ff; border: 1px solid #dbe6fb; color: #1e40af; border-radius: 10px; padding: 9px 14px; font-size: 13px; margin-bottom: 16px; }
.photo-box { background: #f0f2f6; border: 1px dashed #c9d2e0; border-radius: 8px; height: 110px; display: flex; align-items: center; justify-content: center; text-align: center; color: #9ca3af; font-size: 12px; padding: 6px; }
.stat-line { display: flex; gap: 26px; padding: 4px 0 8px; font-size: 13px; color: #4b5563; flex-wrap: wrap; }
.stat-line b { font-size: 17px; color: #1f2937; font-family: Consolas, "Microsoft YaHei", monospace; }
.section-note { font-size: 12px; color: #9ca3af; margin-top: 8px; }
.back-top { font-size: 12px; }

/* ---------- 附件（所有提交审批的单据均可上传多个） ---------- */
.att-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.att { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #bfd3f2;
  background: #eef4ff; color: #1d4ed8; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.att i { font-style: normal; font-size: 15px; }
.att .sz { color: #6b7280; font-size: 11px; }
.att.rm { border-style: dashed; border-color: #c9d2e0; background: #fff; color: #6b7280; }
.att.rm:hover { border-color: #2563eb; color: #2563eb; }
.att-x { margin-left: 2px; color: #9ca3af; font-size: 13px; }
.att-x:hover { color: #dc2626; }
.att-view { max-width: 520px; padding: 26px 28px; }
.att-view .ph { height: 240px; border-radius: 10px; background: #f3f6fb; border: 1px dashed #c9d2e0;
  display: flex; align-items: center; justify-content: center; text-align: center; color: #6b7280; font-size: 14px; }
.att-view .nm { font-size: 13px; color: #1f2937; font-weight: 600; margin-top: 12px; }
.att-view .mt { font-size: 12px; color: #6b7280; margin-top: 3px; }

/* ---------- 交互引擎（app.js） ---------- */
.app-modal { display: none; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; }
.app-modal.open { display: flex; }
.app-modal-mask { position: absolute; inset: 0; background: rgba(17,24,39,.45); }
.app-modal-box { position: relative; width: 560px; max-width: 92%; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 18px 50px rgba(15,30,70,.28); }
.app-modal-box.wide { width: 720px; }
.app-modal-head { padding: 14px 18px; font-size: 15px; font-weight: 700; color: #1e3a8a; border-bottom: 1px solid #eef1f6; }
.app-modal-x { position: absolute; right: 16px; top: 12px; cursor: pointer; color: #9ca3af; font-size: 16px; }
.app-modal-body { padding: 16px 18px 4px; }
.app-modal-foot { padding: 12px 18px 16px; text-align: right; }
.app-modal-foot .btn-ghost, .app-modal-foot .btn { margin-left: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row label { display: block; font-size: 12px; color: #4b5563; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 1px solid #d6dbe4; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; background: #fff; }
.form-row textarea { min-height: 68px; resize: vertical; }
.form-row .req { color: #dc2626; margin-left: 3px; }
.form-row.err input, .form-row.err select, .form-row.err textarea { border-color: #dc2626; background: #fff7f7; }
.app-toast { position: fixed; right: 26px; bottom: 26px; z-index: 200; background: #111827; color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 13px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; }
.app-toast.show { opacity: .95; transform: none; }
tr.row-new, .row-new { background: #e7f6ec !important; transition: background 2s; }
.row-out { opacity: 0; transition: opacity .25s; }
tr.row-off td { color: #a8b0bc; background: #f7f8fa; }
.row-off { opacity: .55; }
.switch { cursor: pointer; }
.table select, .table input { border: 1px solid #d6dbe4; border-radius: 6px; padding: 4px 8px; font-size: 12.5px; font-family: inherit; }
.pager { display: flex; align-items: center; gap: 4px; padding: 10px 2px 2px; font-size: 12.5px; color: #6b7280; }
.pager .cnt { margin-right: 8px; }
.pager .pg { min-width: 26px; text-align: center; padding: 3px 8px; border: 1px solid #d6dbe4; border-radius: 6px; color: #374151; cursor: pointer; background: #fff; user-select: none; }
.pager .pg:hover { border-color: #2563eb; color: #2563eb; }
.pager .pg.mute { border: none; background: none; cursor: default; color: #9ca3af; padding: 3px 2px; }
.pager .pg.disabled { opacity: .4; pointer-events: none; }
.pager .pg.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.pager .pg.on { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ---------- 可搜索输入框下拉面板（派工人员搜索等 combobox 共用） ---------- */
.form-row { position: relative; }
.combo-pop { display: none; position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 30;
  background: #fff; border: 1px solid #d6dbe4; border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
  max-height: 190px; overflow-y: auto; padding: 4px; }
.combo-pop.open { display: block; }
.combo-item { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: 13px;
  color: #1f2937; border-radius: 6px; cursor: pointer; }
.combo-item:hover { background: #eef2f8; }
.combo-none { color: #8a94a6; cursor: default; justify-content: flex-start; }
.combo-meta { color: #8a94a6; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
