/* patrol.css —— 扫码巡检（2026-11-15）
 * 单独一份，不往 styles.css 里追加（那边另一条线在改）。
 * 变量沿用 styles.css 的 :root（--cyan / --ink / --line …），这里只写巡检自己的块。
 */

.pt-head { padding: 2px 0 10px; }
.pt-head-bar { display: flex; align-items: flex-start; gap: 10px; }
.pt-head-text { flex: 1 1 auto; min-width: 0; }
.pt-h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: .5px; color: var(--ink); }
.pt-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.pt-back { flex: 0 0 auto; margin-top: 2px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font: inherit; font-size: 13px; color: var(--ink-2); }

.pt-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; }
.pt-chip { flex: 0 0 auto; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-size: 13px; color: var(--ink-2); white-space: nowrap;
  -webkit-tap-highlight-color: transparent; }
.pt-chip.on { border-color: transparent; background: var(--grad); color: #fff; font-weight: 600; }
.pt-chip-me { margin-left: 4px; padding: 0 5px; border-radius: 6px; background: #FFF3D6;
  font-style: normal; font-size: 10px; color: #9A6412; vertical-align: 1px; }

.pt-list { list-style: none; margin: 0; padding: 0; }
.pt-card { margin: 0 0 10px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow-1); }
.pt-card-top { display: flex; align-items: center; gap: 8px; }
.pt-code { font-size: 15px; font-weight: 700; letter-spacing: .6px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.pt-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pt-tag.is-today { background: #E7F8F0; color: #0F7A55; }
.pt-tag.is-todo { background: #FFF6E5; color: var(--warn-text); }
.pt-tag.is-over { background: #FEECEC; color: var(--red); }
.pt-name { margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.pt-meta { margin: 4px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }

.pt-card-t { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.pt-kv { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pt-kv:last-child { border-bottom: 0; }
.pt-k { flex: 0 0 84px; font-size: 12.5px; color: var(--ink-3); }
.pt-v { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }

.pt-items { list-style: none; margin: 0; padding: 0; }
.pt-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line);
  font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.pt-item:last-child { border-bottom: 0; }
.pt-item-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-3); }

.pt-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pt-photo { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #F1F5F9; }
.pt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-photo-del { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(15, 23, 42, .62); color: #fff; font: inherit; font-size: 14px; line-height: 1; }
.pt-file { display: none; }

.pt-label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-3); }
.pt-note { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font: inherit; font-size: 14px; line-height: 1.5; color: var(--ink);
  resize: vertical; }

.pt-btn { display: block; width: 100%; height: 44px; margin: 6px 0; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--cyan);
  -webkit-tap-highlight-color: transparent; }
.pt-btn.is-main { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(8,145,178,.8); }
.pt-btn.is-ghost { color: var(--ink-2); }
.pt-btn:active { transform: scale(.995); }
.pt-btn[disabled] { opacity: .65; }
.pt-acts { margin-top: 12px; }
.pt-tip { margin: 6px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }
.pt-done { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: #0F7A55; }

.pt-empty { text-align: left; }
.pt-empty-t { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.pt-empty-s { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink-3); }

/* ---------- 打印标签 ---------- */
.pt-print { position: fixed; inset: 0; z-index: 70; overflow-y: auto; background: #F3F6F9; padding: 12px; }
.pt-print-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pt-print-bar b { flex: 1 1 auto; font-size: 13.5px; color: var(--ink); }
.pt-print-bar .pt-btn { width: auto; height: 36px; margin: 0; padding: 0 14px; font-size: 13px; }
.pt-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-label-card { padding: 8px; border: 1px dashed #CBD5E1; border-radius: 10px; background: #fff; text-align: center; }
.pt-label-code { font-size: 16px; font-weight: 700; letter-spacing: .6px; color: #0E1B2C; }
.pt-label-name { margin: 2px 0 6px; font-size: 9.5px; line-height: 1.3; color: #5A6472; min-height: 24px; }
.pt-qr { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #F8FAFC; }
.pt-qr.is-missing { display: none; }
.pt-qr-missing { display: none; padding: 14px 4px; font-size: 9px; line-height: 1.3; color: #94A3B8;
  border: 1px dashed #CBD5E1; border-radius: 6px; }
.pt-qr.is-missing + .pt-qr-missing { display: block; }

@media print {
  body > * { display: none !important; }
  .pt-print { position: static; display: block !important; padding: 0; background: #fff; }
  .pt-print-bar { display: none !important; }
  .pt-sheet { grid-template-columns: repeat(4, 1fr); gap: 4mm; }
  .pt-label-card { break-inside: avoid; border-color: #999; }
}

/* ==================== 专项检查表（消防 / 标识）2026-11-15 ==================== */
.pt-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.pt-check-entry { display: block; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.pt-check-entry.is-due { border-color: #F6D9A8; background: var(--warn-bg); }
.pt-ce-top { display: flex; align-items: center; gap: 6px; }
.pt-ce-name { flex: 1 1 auto; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pt-ce-go { color: var(--ink-3); }
.pt-ce-sub { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }
.pt-check-entry.is-due .pt-ce-sub { color: #B07B22; font-weight: 600; }

.pt-ck-list { margin: 0 0 8px; }
.pt-ck-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.pt-ck-row:last-child { border-bottom: 0; }
.pt-ck-text { flex: 1 1 100%; min-width: 0; }
.pt-ck-t { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.pt-ck-hint { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-3); }
.pt-ck-pills { display: flex; gap: 6px; width: 100%; }
.pt-pill { flex: 1 1 0; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 12.5px; color: var(--ink-2); -webkit-tap-highlight-color: transparent; }
.pt-pill.on { border-color: transparent; color: #fff; font-weight: 600; }
.pt-pill.is-ok.on { background: #10B981; }
.pt-pill.is-bad.on { background: var(--red); }
.pt-pill.is-na.on { background: #94A3B8; }
.pt-ck-row.is-miss { animation: pt-flash .7s ease 2; border-radius: 10px; }
@keyframes pt-flash { 0%, 100% { background: transparent; } 50% { background: #FEF2F2; } }

.pt-ask { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(15, 23, 42, .45); }
.pt-ask-card { width: 100%; max-width: 340px; padding: 16px; border-radius: 16px; background: #fff; }
.pt-ask-t { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.pt-ask-list { margin: 0 0 10px; padding-left: 18px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }

/* ---------- 2026-11-15 巡检记录上云：列表行上的「已上传 / 待上传」 ---------- */
/* 已上传＝那条已经进服务器；待上传＝还在手机上，联网自动补传。没记录的行不显示。 */
.pt-up { margin-left: 6px; padding: 2px 7px; border-radius: 999px; font-size: 11px; line-height: 1.5;
  white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.pt-up.is-on { color: #0F7B4F; background: rgba(16, 185, 129, .12); }
.pt-up.is-off { color: #B07B22; background: rgba(176, 123, 34, .14); }