:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e5e8ee;
  --text: #1c2128;
  --muted: #7a8291;
  --brand: #0f6fff;
  --ok: #16a34a;
  --warn: #f08a00;
  --bad: #e5484d;
  --radius: 14px;
  --safe: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ---------------------------------------------------------------- 图标
 * 页面里的界面图标全部走 index.html 里那套 <symbol>，统一用线条画法：
 * 24 网格、圆头圆角、描边 1.8、颜色跟 currentColor 走（所以选中态自动变蓝）。
 * 以前用的是 ✓ 📋 🔧 ⚠ 📊 ⚙ 👤 ✕ 这些字符，同一条菜单在不同手机上有的黑白有的彩色、
 * 粗细也不一样，看着像拼接的；换成一个 svg 后各端一致。
 * 用法：<svg class="ico"><use href="#i-user"/></svg>
 */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -.16em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

#app { min-height: 100vh; padding-bottom: calc(64px + var(--safe)); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 812px;
  margin: 0 auto;
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, #0f6fff, #2f8bff);
  color: #fff;
  border-radius: 0 0 16px 16px;
}
.topbar-main { flex: 1; min-width: 0; }
.topbar-title { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.topbar-sub {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 12px; opacity: .85; margin-top: 2px;
}
.topbar-sub > #pageSub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 顶栏版本徽标：2026-11-09 嫌大号版本号占地方去掉过，2026-11-11 又要求
   网页版 / 安卓 App 里能随时看到版本，于是缩成副标题行末尾这枚可点的小胶囊。
   窄屏只留网页版本，App 版本收在详情弹窗里，不挤副标题。 */
.ver-chip {
  flex: 0 0 auto; font-family: inherit; font-size: 11px; line-height: 1.45;
  color: #fff; background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .42); border-radius: 999px;
  padding: 1px 7px; white-space: nowrap; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.ver-chip:hover { background: rgba(255, 255, 255, .28); }
.ver-chip-extra { opacity: .82; }
@media (max-width: 400px) { .ver-chip-extra { display: none; } }

/* 版本信息弹窗：左边叫法、右边版本，长地址也能折行 */
.ver-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ver-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 11px; font-size: 13px; border-bottom: 1px solid var(--line);
}
.ver-row:last-child { border-bottom: 0; }
.ver-row span { color: var(--muted); flex: 0 0 auto; }
.ver-row b { font-weight: 600; text-align: right; word-break: break-all; }

/* 服务器线路选择：整行可点，当前那条标出来并禁用，避免点了原地跳一次 */
.srv-list { display: flex; flex-direction: column; gap: 8px; }
.srv-row {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  text-align: left; font: inherit; color: var(--text);
  padding: 10px 12px; background: var(--card); cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px;
}
.srv-row:hover { border-color: var(--brand); }
.srv-row.on,
.srv-row:disabled { border-color: var(--brand); background: #eef5ff; cursor: default; color: var(--text); }
.srv-top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.srv-top i {
  font-style: normal; font-size: 11px; line-height: 1.5;
  color: #fff; background: var(--brand); border-radius: 999px; padding: 0 6px;
}
.srv-url { font-size: 12px; color: var(--brand); word-break: break-all; }
.srv-note { font-size: 12px; color: var(--muted); }
.srv-now { text-align: center; margin-top: 10px; }
.link-btn {
  font: inherit; font-size: 12px; color: var(--muted); background: none;
  border: 0; padding: 6px 10px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--brand); }
.icon-btn {
  border: 0;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.icon-btn .ico { width: 18px; height: 18px; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .3); }

/* 顶栏右上角：实时时间（2026-11-10 起只显示时间，日期已去掉） */
.topbar-clock {
  display: flex;
  align-items: center;
  line-height: 1.18;
  white-space: nowrap;
  flex: 0 0 auto;
}
.topbar-clock b {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .4px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
/* 窄屏压缩字号，避免挤掉标题 */
@media (max-width: 400px) {
  .topbar-clock b { font-size: 15px; }
}

/* 顶部细进度条：只为「点了没反应」的那几百毫秒给个交代。
 * 固定在屏幕顶端 3px，不占布局、不挡点击；请求结束就隐藏。 */
.prog {
  position: fixed;
  left: 0; top: 0;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--brand), rgba(15, 111, 255, .2));
  transform-origin: 0 50%;
  animation: progRun 1.3s ease-out infinite;
  z-index: 9999;
  pointer-events: none;
}
@keyframes progRun {
  0%   { transform: scaleX(.04); opacity: .95; }
  55%  { transform: scaleX(.62); opacity: 1; }
  100% { transform: scaleX(1);   opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  .prog { animation: none; transform: scaleX(.35); }
}

.view { padding: 12px 12px 8px; max-width: 812px; margin: 0 auto; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
}

.sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 14px 4px 8px;
  letter-spacing: .3px;
}
.sec-title span.count { font-weight: 500; }

.item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.item:last-child { border-bottom: 0; padding-bottom: 0; }
.item:first-child { padding-top: 0; }

.checkbox {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #c8cdd6;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: transparent;
  cursor: pointer;
  margin-top: 1px;
  transition: all .15s;
}
.checkbox.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.checkbox.issue { background: var(--warn); border-color: var(--warn); color: #fff; }

.item-main { flex: 1; min-width: 0; }
.item-name { font-size: 15px; font-weight: 550; }
.item-name.done { color: var(--muted); text-decoration: line-through; }
.item-hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.item-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--brand);
}
.tag.gray { background: #f1f3f6; color: var(--muted); }
.tag.warn { background: #fff4e2; color: var(--warn); }
.tag.ok { background: #e9f8ef; color: var(--ok); }

.note-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  flex: 0 0 auto;
}

.note-text {
  margin-top: 6px;
  font-size: 12.5px;
  color: #8a5b00;
  background: #fff8e8;
  border-radius: 8px;
  padding: 6px 8px;
}

/* 回到今天（仅在查看历史日期时出现） */
.backtoday {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin: 0 0 8px; padding: 9px 12px;
  border: 1px solid #bcd7ff; border-radius: 12px;
  background: #edf5ff; color: var(--brand);
  font-family: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer;
}
.backtoday em { font-style: normal; font-size: 12px; font-weight: 400; color: #5b7fb8; }
.backtoday .ico { width: 15px; height: 15px; margin-right: 5px; stroke-width: 1.9; }
.backtoday:active { background: #dfeaff; }
.backtoday:disabled { opacity: .65; cursor: default; }

/* 历史日期的完成记录（只读清单） */
.card.daydone { background: #fbfdff; border: 1px solid #e3edfb; }
.daydone-mark {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--ok); background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin-top: 1px;
}
.daydone-mark.issue { background: var(--warn); border-color: var(--warn); }
.daydone-empty { font-size: 13px; color: var(--muted); padding: 4px 2px; }

/* 日期条 */
.datestrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.datestrip::-webkit-scrollbar { display: none; }
.dchip {
  flex: 0 0 auto;
  min-width: 58px;
  text-align: center;
  padding: 8px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.dchip b { display: block; font-size: 16px; color: var(--text); font-weight: 650; }
.dchip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dchip.on b { color: #fff; }

/* 表单 */
.field { margin-bottom: 14px; }
.field-label { font-size: 13px; font-weight: 600; color: #4a5261; margin-bottom: 6px; }
.input, .textarea, select.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.textarea { min-height: 76px; resize: vertical; }
.input:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 111, 255, .1); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  color: #4a5261;
  cursor: pointer;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { background: #eef1f6; color: #374151; }
.btn.danger { background: #fdecec; color: var(--bad); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; }

/* 列表卡片 */
.rec {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.rec:last-child { border-bottom: 0; padding-bottom: 2px; }
.rec:first-child { padding-top: 2px; }
.rec-head { display: flex; gap: 8px; align-items: baseline; }
.rec-title { font-weight: 600; flex: 1; }
.rec-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* 客户端报错原文：等宽、可滚动，长堆栈也不会把管理页撑破 */
.err-text {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #fdf6f6;
  border: 1px solid #f3dede;
  border-radius: 8px;
  font-family: Consolas, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: #8c2f2f;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 168px;
  overflow: auto;
  -webkit-user-select: text;
  user-select: text;
}
.rec-body { font-size: 13.5px; margin-top: 6px; color: #3f4753; word-break: break-word; }
/* 运行日志里的系统事件正文：保留换行（发版说明、版本变化是一行一条） */
.log-text {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #3f4753;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.rec-actions { margin-top: 8px; display: flex; gap: 8px; }

/* ---------------------------------------------------------------- 我的账号
 * 点右上角头像弹出来的卡片：左边头像、右边姓名，下面几行是线路 / 版本 / 有效期。 */
.me-card { padding: 2px 0 4px; }
.me-head {
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.me-avatar {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 19px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.me-id { min-width: 0; }
.me-name { font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.me-rows { padding-top: 4px; }
.me-row {
  display: flex; gap: 12px; align-items: baseline; justify-content: space-between;
  font-size: 13.5px; padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.me-row:last-child { border-bottom: 0; }
.me-row span { color: var(--muted); flex: 0 0 auto; }
.me-row b { font-weight: 600; text-align: right; word-break: break-all; }
.me-actions { flex-wrap: wrap; }
.mini-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12.5px;
  color: #4a5261;
  cursor: pointer;
}
.mini-btn.danger { color: var(--bad); border-color: #f6c9ca; }
.mini-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 统计 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: #fff;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 24px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; }
.bar-label { width: 92px; flex: 0 0 auto; color: #4a5261; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 99px; }
.bar-val { width: 54px; text-align: right; color: var(--muted); font-size: 12px; flex: 0 0 auto; }

/* 底部导航 */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 812px;
  z-index: 30;
  display: flex;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe);
  border-radius: 14px 14px 0 0;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 7px 2px 8px;
  font-size: 11px;
  color: #8b93a1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tab-ico {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.tab-ico .ico { width: 22px; height: 22px; stroke-width: 1.7; }
/* 未选中描边略淡一点，选中态回到品牌蓝，和文字一起变 */
.tab:not(.active) .tab-ico .ico { opacity: .92; }
.tab.active { color: var(--brand); font-weight: 600; }
/* 异常入口的叹号固定用警示红：扫一眼就知道哪一格是告警入口（选中时文字仍是品牌蓝） */
.tab[data-tab="issue"] .tab-ico .ico { color: var(--bad); }
/* hidden 属性会被 .tab 的 display:flex 覆盖，这里显式兜底（普通用户隐藏「管理」） */
.tab[hidden] { display: none !important; }

/* 底部菜单未完成数角标 */
.tab-badge {
  position: absolute;
  top: -5px;
  left: 13px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  color: #fff;
  text-align: center;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px #fff;
  font-variant-numeric: tabular-nums;
}
.tab-badge[hidden] { display: none !important; }
.tab-badge.b-today { background: var(--brand); }
.tab-badge.b-ticket { background: var(--warn); }
.tab-badge.b-issue { background: var(--bad); }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 24, 40, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + var(--safe));
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  animation: slideup .18s ease-out;
}
@keyframes slideup { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head b { font-size: 16px; }
.modal-head .icon-btn { background: #f1f3f6; color: #4a5261; width: 30px; height: 30px; }
.modal-head .icon-btn .ico { width: 16px; height: 16px; stroke-width: 2; }
.modal-body { overflow: auto; }
.modal-foot { display: flex; gap: 10px; margin-top: 14px; }
.modal-foot .btn { flex: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe));
  transform: translateX(-50%);
  background: rgba(28, 33, 40, .92);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  z-index: 80;
  max-width: 84vw;
  text-align: center;
}
.toast[hidden] { display: none; }

.empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 26px 10px; }
.center-page { padding: 20px 14px; max-width: 460px; margin: 0 auto; }
.brand-big { font-size: 22px; font-weight: 700; text-align: center; margin: 22px 0 6px; }
.brand-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.hint-line { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* 本周设备运行小结：自动统计弹窗 */
.report-link {
  display: inline-block; margin-top: 5px; padding: 0; border: 0; background: none;
  color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 500;
  text-align: left; cursor: pointer;
}
.report-link:active { opacity: .6; }
.wr-range { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.wr-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--line);
}
.wr-row:last-of-type { border-bottom: 0; }
.wr-row b { font-weight: 600; }
.wr-sub { font-size: 12px; color: var(--muted); margin: -4px 0 6px; }
.wr-issue { border-left: 3px solid var(--warn); padding: 6px 0 6px 10px; margin: 8px 0 0; }
.wr-issue.urgent { border-left-color: var(--bad); }
.wr-issue-t { font-size: 13.5px; font-weight: 500; line-height: 1.5; }
.wr-issue-m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wr-text { font-size: 13.5px; line-height: 1.8; color: #3f4753; word-break: break-word; }
/* 弹窗里名称比统计页长，多留一点宽度，少截断 */
.wr-bar .bar-label { width: 118px; font-size: 12.5px; }
.wr-bar .bar-val { width: 44px; }
.tag.bad { background: #fdecec; color: var(--bad); margin-right: 4px; }

/* 登录页「记住账号和密码」 */
.remember-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: -2px 0 16px;
}
.remember {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: #4a5261; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.remember input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; flex: none;
  accent-color: var(--brand); cursor: pointer;
}
.remember-clear {
  flex: none; border: 0; background: none; padding: 4px 2px;
  font-size: 12.5px; color: var(--muted);
  text-decoration: underline; cursor: pointer;
}
.remember-clear[hidden] { display: none; }
.remember-clear:active { color: var(--brand); }
.photo-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-add {
  width: 76px; height: 76px;
  border: 1px dashed #c8cdd6;
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--muted); font-size: 11px; cursor: pointer; background: #fafbfc;
}
.photo-add:hover { border-color: var(--brand); color: var(--brand); background: #f4f8ff; }
.photo-add .ico { width: 24px; height: 24px; stroke-width: 1.6; }
.photo-add span { font-size: 11px; letter-spacing: .2px; white-space: nowrap; }

/* 照片水印设置：维修页可填备注，统计页只放开关，两处共用一份设置 */
.wm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.wm-bar label {
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 13px; color: #4a5261; cursor: pointer;
}
.wm-bar input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }
.wm-bar .wm-note {
  flex: 1 1 200px; min-width: 0; width: auto;
  padding: 7px 10px; font-size: 13px;
}
/* 按钮里的图标和文字之间留一点距离（原来靠「＋ 」那个空格，现在由样式管） */
.btn .ico { margin-right: 5px; vertical-align: -.19em; }
.photo-slot { position: relative; width: 76px; height: 76px; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-slot button {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(28,33,40,.8); color: #fff; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.photo-slot button .ico { width: 12px; height: 12px; stroke-width: 2.4; }

/* 添加到桌面提示条 */
.install-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eef4ff;
  border: 1px solid #d3e2ff;
  border-radius: var(--radius);
  padding: 12px 12px 12px 14px;
  margin-bottom: 12px;
}

.install-tip-body { flex: 1 1 auto; min-width: 0; }

.install-tip-title {
  font-size: 14px;
  font-weight: 600;
  color: #14418f;
  margin-bottom: 4px;
}

.install-tip-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: #4a6086;
}

.install-tip .mini-btn {
  flex: 0 0 auto;
  margin-top: 2px;
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.icon-btn.tiny {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  font-size: 12px;
  background: transparent;
  color: #6f829e;
}
.icon-btn.tiny .ico { width: 14px; height: 14px; stroke-width: 2; }

/* 入口地址 */
.addr-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
}

.addr-text {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  color: #1c2128;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------- 年度主计划矩阵 */
.am-wrap { padding: 12px 10px; }

.am-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.am-row.am-head { border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.am-row:last-of-type { border-bottom: 0; padding-bottom: 2px; }

.am-name { flex: 1 1 auto; min-width: 0; font-size: 12px; line-height: 1.3; }
.am-name b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-name span {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am-head .am-name { font-size: 10.5px; color: var(--muted); }
/* 表头左上角是年份（跨年自动变），下一行才是表头说明 */
.am-head .am-name b { font-size: 11.5px; color: var(--text); }
.am-name.editable { cursor: pointer; }
.am-name.editable:active { opacity: .6; }

.am-cells { flex: 0 0 auto; display: flex; gap: 2px; align-items: center; }
.am-cell {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #edf0f4;
  font-size: 9px;
  line-height: 13px;
  text-align: center;
  color: var(--muted);
  box-sizing: border-box;
}
.am-head .am-cell { background: transparent; height: 12px; line-height: 12px; }
.am-cell.plan { background: #c9dcff; }
.am-cell.done { background: var(--ok); color: #fff; font-size: 10px; }
.am-head .am-cell.cur { background: var(--brand); color: #fff; font-weight: 700; border-radius: 3px; }

@media (max-width: 380px) {
  .am-cell { width: 12px; height: 12px; line-height: 12px; }
  .am-name { font-size: 11.5px; }
}

/* 宽屏下把矩阵放大，避免名称与月份格之间空太多 */
@media (min-width: 760px) {
  .am-name { max-width: 460px; }
  .am-name b { font-size: 13.5px; }
  .am-name span { font-size: 11.5px; }
  .am-cells { gap: 3px; }
  .am-cell { width: 20px; height: 20px; line-height: 20px; font-size: 10.5px; }
  .am-head .am-cell { height: 16px; line-height: 16px; }
  .am-cell.done { font-size: 12px; }
}

/* 本周期已完成（折叠区） */
.done-fold { padding: 0; }
.fold-head {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.fold-title { font-size: 14px; font-weight: 600; color: #5b6472; }
.fold-hint { font-size: 11.5px; color: #9aa2b1; }
.done-fold .item { padding: 11px 14px; }
.done-fold .item:last-child { padding-bottom: 14px; border-bottom: 0; }

/* 工单归档区：已完成/已转出默认收起，只留标题与条数 */
.tk-fold { margin-bottom: 12px; }
.tk-fold .rec { padding: 11px 14px; }
.tk-fold .rec:last-child { padding-bottom: 14px; }
.rec-arch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  font-size: 13px;
}
.rec-arch-row:last-child { border-bottom: 0; padding-bottom: 12px; }
.rec-arch-row:active { background: #f7f9fc; }
.rec-arch-row b { font-weight: 600; letter-spacing: .3px; }

/* ---------------------------------------------------------------- 升级包下发提示
 * 服务器每次发版会带一个批次号，所有端共用的这份网页轮询到新批次就在这里提示。
 * 用普通文档流（不用 fixed），登录页隐藏、登录后才占一行，不遮挡底部页签。 */
.push-bar {
  max-width: 812px;
  margin: 10px 12px 0;
  padding: 11px 14px 12px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #f2d9a4;
  box-shadow: 0 2px 8px rgba(180, 120, 20, .08);
  color: #6b4a12;
}
.push-bar[hidden] { display: none; }
@media (min-width: 836px) { .push-bar { margin-left: auto; margin-right: auto; } }
.push-bar-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.push-bar-badge {
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.push-bar-title { font-size: 14px; font-weight: 600; flex: 1; min-width: 140px; }
.push-bar-later {
  border: 0; background: transparent; color: #9a7b3f; cursor: pointer;
  font-family: inherit; font-size: 12px; padding: 4px 6px;
}
.push-bar-later:hover { color: var(--brand); }
.push-bar-meta { font-size: 11.5px; color: #9a7b3f; margin-top: 4px; }
.push-bar-note { font-size: 13px; margin-top: 6px; line-height: 1.45; }
.push-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.push-bar-actions .mini-btn {
  text-decoration: none; display: inline-flex; align-items: center;
  background: #fff; border-color: #e7cd9a; color: #6b4a12;
}
.push-bar-actions .mini-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.push-bar-actions .mini-btn.primary:disabled { opacity: .65; cursor: default; }
/* 「本机已是最新版」：不再给一个点了没反应的下载按钮，改成一句实话 */
.push-bar-ok {
  display: inline-flex; align-items: center; font-size: 12px; color: #8a6a2f;
  background: rgba(255, 255, 255, .7); border: 1px dashed #e7cd9a;
  border-radius: 8px; padding: 4px 9px;
}

/* 管理页：各端送达台账（批次概况已并进「三端当前版本」卡，不再单占一块） */
.push-ack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.push-ack span {
  font-size: 12px; color: #4a5261; background: #f4f6f9;
  border-radius: 6px; padding: 3px 8px;
}

/* 搜索工作记录：一天的时间轴（巡检 / 维修 / 异常 / 工单 / 年度计划） */
.qs-row { display: flex; gap: 8px; }
.qs-field { flex: 1 1 0; min-width: 0; }
.qs-field span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.qs-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 2px; }
.qs-kw { margin-top: 10px; }
.qs-acts { margin: 10px 0 4px; }
.qs-acts .btn { width: 100%; }
.qs-sum { font-size: 12px; color: var(--muted); margin: 10px 0 8px; }
.qs-out { max-height: 44vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.wl-list { display: flex; flex-direction: column; gap: 8px; }
.wl-row { display: flex; gap: 10px; padding: 9px 10px; background: #f7f9fc; border-radius: 8px; }
.wl-time {
  flex: 0 0 44px; font-size: 12.5px; font-weight: 700; color: var(--brand);
  font-variant-numeric: tabular-nums; line-height: 1.35;
}
.wl-main { flex: 1 1 auto; min-width: 0; }
.wl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-top b { font-size: 13px; font-weight: 600; }
.wl-kind {
  font-size: 10.5px; padding: 1px 6px; border-radius: 999px;
  background: #e8eef8; color: #33507a; white-space: nowrap;
}
.wl-kind.k-repair { background: #e6f4ec; color: #1e6b45; }
.wl-kind.k-issue, .wl-kind.k-issue_done { background: #fdeaea; color: #a32222; }
.wl-kind.k-ticket, .wl-kind.k-ticket_start, .wl-kind.k-ticket_done { background: #fff2e0; color: #8a5300; }
.wl-kind.k-annual { background: #eae7fb; color: #4b3f9e; }
.wl-detail { font-size: 12px; color: var(--text); opacity: .82; margin-top: 2px; white-space: pre-wrap; }
.wl-who { font-size: 11px; color: var(--muted); margin-top: 3px; }
.wl-photos { display: flex; gap: 6px; margin-top: 6px; }
.wl-ph { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; background: #eceff3; }
@media (max-width: 520px) {
  .qs-row { flex-wrap: wrap; }
  .qs-field:nth-child(2), .qs-field:nth-child(3) { flex: 0 0 calc(50% - 4px); }
}

/* 最近上报的设备：一行一台，右侧一个清理按钮 */
.cli-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: 12px 0 4px; font-size: 12px; color: var(--muted);
}
.cli-line {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px dashed var(--line);
}
.cli-line:last-of-type { border-bottom: 0; }
.cli-name {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cli-meta {
  flex: 0 0 auto; font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cli-line .mini-btn { flex: 0 0 auto; padding: 3px 8px; font-size: 11.5px; }
.log-scroll { max-height: 52vh; overflow: auto; -webkit-overflow-scrolling: touch; }

/* 搜索改成「开始日期时间 ~ 结束日期时间」后各占一行：
   手机上 datetime-local 点开是整屏选择器，两个并排会挤成一条缝 */
.qs-row2 { flex-direction: column; gap: 10px; }
.qs-row2 .qs-field,
.qs-row2 .qs-field:nth-child(2),
.qs-row2 .qs-field:nth-child(3) { flex: 0 0 auto; width: 100%; }
.qs-row2 input[type="datetime-local"] { font-size: 14px; min-height: 38px; }
.wl-time.wide { flex: 0 0 82px; font-size: 11.5px; }
