/* nearmiss.css —— 未遂事件上报（2026-11-15）
 * 单独一份，不往 styles.css 里追加（那边另一条线在改）。
 * 变量沿用 styles.css 的 :root（--cyan / --grad / --ink / --line …），跟 patrol.css 同一套：
 * 浅灰底、白卡、圆角、主色蓝。类名一律 nm- 前缀。
 */

.nm-head { padding: 2px 0 10px; }
.nm-h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: .5px; color: var(--ink); }
.nm-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

.nm-card { margin: 0 0 12px; padding: 14px 14px 4px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); box-shadow: var(--shadow-1); }
.nm-field { margin-bottom: 14px; }
.nm-label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.nm-input { display: block; 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);
  -webkit-tap-highlight-color: transparent; }
.nm-input:focus { outline: none; border-color: var(--cyan-2); }
.nm-textarea { min-height: 92px; resize: vertical; }
.nm-input.is-bad { border-color: var(--danger); background: #FFF7F7; }
.nm-hint { margin: 5px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }
.nm-err { margin: 5px 0 0; font-size: 12px; font-weight: 600; line-height: 1.45; color: var(--danger); }
.nm-err.hidden, .nm-form-err.hidden { display: none; }
.nm-form-err { margin: 0 0 10px; padding: 9px 11px; border: 1px solid #FECACA;
  border-radius: 12px; background: #FFF7F7; font-size: 13px; font-weight: 600;
  line-height: 1.5; color: var(--danger); }

/* ---------- 照片 ---------- */
.nm-file { display: none; }
.nm-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 8px; }
.nm-photos > .nm-hint { grid-column: 1 / -1; margin: 0; }
.nm-photo { position: relative; }
.nm-photo-img { display: block; width: 100%; height: 84px; object-fit: cover;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.nm-photo-del { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px;
  padding: 0; border: 0; border-radius: 50%; background: var(--ink-2); color: #fff;
  font: inherit; font-size: 15px; line-height: 22px; text-align: center; }
.nm-photo-bar { display: flex; align-items: center; gap: 10px; }
.nm-pick { padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--cyan-soft); font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--cyan); -webkit-tap-highlight-color: transparent; }
.nm-photo-count { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 提交 / 底部说明 ---------- */
.nm-submit { display: block; width: 100%; height: 46px; border: 0; border-radius: 12px;
  background: var(--grad); color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 18px -10px rgba(8,145,178,.8);
  -webkit-tap-highlight-color: transparent; }
.nm-submit:active { transform: scale(.995); }
.nm-submit[disabled] { opacity: .65; }
.nm-foot { margin: 12px 0 0; text-align: center; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }

/* ---------- 点开大图（浮层，照 patrol.js 的 openPrint） ---------- */
.nm-viewer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 20px;
  background: rgba(15, 23, 42, .92); }
.nm-viewer-img { max-width: 94vw; max-height: 78vh; object-fit: contain; border-radius: 12px; }
.nm-viewer-tip { margin: 0; font-size: 12.5px; color: #E5E7EB; }
