/* 安小助 · 慧眼识险（第二十五应用）：AI 实时视觉安全巡检。
   视觉：琥珀棕 hero（tone hawkeye）+ 取景器暗色 + 等级色（高红 / 中琥珀 / 低天蓝）。 */

.tool-hero.is-hawkeye { background: linear-gradient(135deg, #b45309 0%, #92400e 55%, #78350f 100%); }
.tool-hero.is-hawkeye .tool-hero-ico { color: #fde68a; }

/* ---------- ready 态：说明 + 开启按钮 + 历史 ---------- */
.hk-ready { padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.hk-intro { display: flex; flex-direction: column; gap: 10px; }
.hk-intro-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; }
.hk-intro-row > svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; color: #b45309; }
.hk-intro-row b { display: block; font-size: 14px; color: #1e293b; margin-bottom: 2px; }
.hk-intro-row span { display: block; font-size: 12.5px; color: #64748b; line-height: 1.65; }

.hk-start { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #d97706, #b45309); color: #fff; font-size: 15.5px; font-weight: 600; box-shadow: 0 6px 18px rgba(180, 83, 9, .28); cursor: pointer; }
.hk-start:active { transform: translateY(1px); }
.hk-start svg { width: 20px; height: 20px; }

.hk-why { margin: -4px 0 0; font-size: 11.5px; color: #94a3b8; line-height: 1.6; }

/* 巡检历史 */
.hk-hist { display: flex; flex-direction: column; gap: 8px; }
.hk-hist-h { display: flex; align-items: baseline; justify-content: space-between; }
.hk-hist-h h3 { margin: 0; font-size: 14px; color: #1e293b; }
.hk-hist-h span { font-size: 11.5px; color: #94a3b8; }
.hk-hist-card { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.hk-hist-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hk-hist-main b { font-size: 13.5px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-hist-main span { font-size: 11.5px; color: #94a3b8; }
.hk-hist-ops { flex: 0 0 auto; display: flex; gap: 6px; }
.hk-hist-ops .btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.hk-hist-ops .hk-del { color: #dc2626; }

/* ---------- 等级徽标 ---------- */
.hk-lv { display: inline-flex; align-items: center; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; line-height: 1.4; flex: 0 0 auto; }
.hk-lv.is-high { color: #b91c1c; background: #fee2e2; }
.hk-lv.is-mid { color: #b45309; background: #fef3c7; }
.hk-lv.is-low { color: #0369a1; background: #e0f2fe; }

/* ---------- live 态：取景器 + 状态 + 控制 ---------- */
.hk-live { padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.hk-viewer { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 68vh; border-radius: 16px; overflow: hidden; background: #0b1220; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); }
#hk-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#hk-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hk-status { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(11, 18, 32, .62); color: #e2e8f0; font-size: 12px; backdrop-filter: blur(6px); max-width: 70%; }
.hk-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; flex: 0 0 auto; }
.hk-dot.is-live { background: #22c55e; animation: hkPulse 1.6s ease-in-out infinite; }
.hk-dot.is-paused { background: #f59e0b; animation: none; }
@keyframes hkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hk-dot.is-live { animation: none; } }

.hk-scene { position: absolute; left: 10px; bottom: 44px; max-width: 78%; padding: 5px 10px; border-radius: 10px; background: rgba(11, 18, 32, .55); color: #cbd5e1; font-size: 11.5px; line-height: 1.5; backdrop-filter: blur(6px); display: none; }
.hk-scene:not(:empty) { display: block; }


/* 疑似风险轻提示（非弹窗）：贴取景器底部，整条可点 */
.hk-tip { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid rgba(245, 158, 11, .65); border-radius: 12px; background: rgba(120, 53, 15, .8); color: #fef3c7; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; backdrop-filter: blur(6px); animation: hkTipIn .3s ease both; }
.hk-tip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.hk-tip[hidden] { display: none; }
@keyframes hkTipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hk-tip { animation: none; } }

.hk-ctrl { display: flex; gap: 10px; }
.hk-btn { flex: 1 1 0; padding: 13px 12px; border-radius: 13px; font-size: 14.5px; font-weight: 600; border: 1px solid #e2e8f0; background: #fff; color: #334155; cursor: pointer; }
.hk-btn.hk-end { background: linear-gradient(135deg, #dc2626, #b91c1c); border-color: transparent; color: #fff; box-shadow: 0 5px 16px rgba(220, 38, 38, .26); }
.hk-btn:active { transform: translateY(1px); }

.hk-live-note { margin: -2px 0 0; font-size: 11.5px; color: #94a3b8; text-align: center; line-height: 1.6; }

/* 确认卡（点提示后才出现） */
.hk-mask { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
.hk-mask[hidden] { display: none; }
.hk-confirm { width: 100%; max-width: 420px; max-height: 86vh; overflow: auto; background: #fff; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 18px 50px rgba(15, 23, 42, .3); }
.hk-confirm-h { display: flex; align-items: center; gap: 8px; }
.hk-confirm-h b { font-size: 16px; color: #0f172a; line-height: 1.4; }
.hk-confirm-img { border-radius: 12px; overflow: hidden; background: #0b1220; }
.hk-confirm-img img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.hk-confirm-body { display: flex; flex-direction: column; gap: 6px; }
.hk-confirm-body p { margin: 0; font-size: 13px; color: #475569; line-height: 1.7; }
.hk-confirm-body p:empty { display: none; }
.hk-confirm-ops { display: flex; gap: 10px; }
.hk-confirm-ops .btn { flex: 1 1 0; }

/* ---------- report 态 ---------- */
.hk-report { padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.hk-rp-head h3 { margin: 0 0 3px; font-size: 17px; color: #0f172a; }
.hk-rp-head span { font-size: 12px; color: #94a3b8; }

.hk-rp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hk-rp-stat { padding: 12px 6px; text-align: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 13px; }
.hk-rp-stat b { display: block; font-size: 20px; color: #0f172a; line-height: 1.2; }
.hk-rp-stat span { display: block; margin-top: 3px; font-size: 11px; color: #94a3b8; }
.hk-rp-stat.is-high b { color: #dc2626; }
.hk-rp-stat.is-mid b { color: #d97706; }

.hk-rp-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.hk-cat-chip { font-size: 11.5px; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 3px 10px; }

/* 隐患记录卡 */
.hk-rec { display: flex; gap: 12px; padding: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; }
.hk-rec-img { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #0b1220; }
.hk-rec-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hk-rec-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hk-rec-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hk-idx { font-size: 11px; font-weight: 700; color: #94a3b8; }
.hk-cat { font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 4px; padding: 1px 6px; }
.hk-rec-body b { font-size: 14px; color: #0f172a; line-height: 1.4; }
.hk-rec-body p { margin: 0; font-size: 12.5px; color: #64748b; line-height: 1.65; }
.hk-rec-body .hk-rec-sugg { margin-top: 2px; font-size: 12px; color: #92400e; background: #fffbeb; border-radius: 8px; padding: 6px 9px; line-height: 1.6; }
.hk-rec-sugg i, .hk-sum-adv i { font-style: normal; font-weight: 700; margin-right: 6px; color: #b45309; }

/* 无风险空态 */
.hk-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px; }
.hk-ok svg { width: 22px; height: 22px; color: #16a34a; flex: 0 0 auto; margin-top: 2px; }
.hk-ok b { display: block; font-size: 14.5px; color: #14532d; margin-bottom: 2px; }
.hk-ok span { display: block; font-size: 12.5px; color: #4d7c0f; line-height: 1.6; }

/* AI 总结 */
.hk-sum { padding: 14px; background: linear-gradient(160deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: 14px; }
.hk-sum-h { font-size: 13px; font-weight: 700; color: #92400e; margin-bottom: 8px; }
.hk-sum p { margin: 0 0 8px; font-size: 13px; color: #78350f; line-height: 1.75; }
.hk-sum ul { margin: 0 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.hk-sum li { font-size: 12.5px; color: #92400e; line-height: 1.65; }
.hk-sum-adv { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #92400e; }
.hk-sum-adv span { line-height: 1.6; }

/* 报告页操作区：主（保存）+ 次（导出/再巡）两级 */
.hk-rp-ops { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.hk-op-main {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; border: 0; border-radius: 13px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hk-op-main:active { transform: scale(0.97); box-shadow: 0 3px 8px rgba(180, 83, 9, 0.25); }
.hk-op-main i { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; }
.hk-op-main i svg { width: 100%; height: 100%; }
.hk-rp-sub { display: flex; gap: 10px; }
.hk-op-sub {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; border-radius: 12px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: #78350f;
  background: #fff; border: 1px solid #fcd34d;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.hk-op-sub:active { transform: scale(0.97); background: #fffbeb; border-color: #f59e0b; }
.hk-op-sub i { display: inline-flex; width: 15px; height: 15px; color: #b45309; flex: 0 0 auto; }
.hk-op-sub i svg { width: 100%; height: 100%; }
.hk-op-done {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px;
  border-radius: 13px; background: #f0fdf4; border: 1px solid #bbf7d0;
}
.hk-op-done svg { width: 20px; height: 20px; color: #16a34a; flex: 0 0 auto; }
.hk-op-done b { display: block; font-size: 13.5px; color: #14532d; }
.hk-op-done span { display: block; font-size: 11.5px; color: #4d7c0f; }

.hk-report .hk-why { margin: 0; }

/* PC 端 */
@media (min-width: 760px) {
  .hk-ready, .hk-live, .hk-report { max-width: 640px; margin-inline: auto; }
  .hk-viewer { aspect-ratio: 4 / 3; }
}

/* ---- 场所录入（ready 态） ---- */
.hk-place-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1.5px solid #fbd9ad; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 14px;
}
.hk-place-card > b { font-size: 15px; color: #78350f; }
.hk-place-card > span { font-size: 12px; color: #8a8f99; }
.hk-place-card input {
  width: 100%; box-sizing: border-box; border: 1.5px solid #e2e6ee; border-radius: 10px;
  padding: 11px 12px; font-size: 15px; color: #1c212b; background: #fafbfc; outline: none;
}
.hk-place-card input:focus { border-color: #b45309; background: #fff; }
.hk-place-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hk-place-chips button {
  border: 1px solid #e8d5b5; background: #fdf6ec; color: #92400e;
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.hk-place-chips button:active { background: #f6e7cd; }

/* ---- 语音开关（live 态） ---- */
.hk-voice { white-space: nowrap; }
.hk-voice.is-on { color: #b45309; border-color: #e8c9a0; background: #fdf6ec; }

/* ---- 台账状态徽章与截图时间 ---- */
.hk-rec-st {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.hk-rec-st.is-suspect { color: #92400e; background: #fdf0dc; }
.hk-rec-st.is-confirmed { color: #15803d; background: #e5f6ea; }
.hk-rec-st.is-ignored { color: #6b7280; background: #eef0f3; }
.hk-rec-time { font-size: 12px; color: #8a8f99; margin: 4px 0 0; }
.hk-cf-time { font-size: 12px; color: #92400e; background: #fdf6ec; border-radius: 8px; padding: 6px 9px; margin: 8px 0 0; }

/* ---- 报告统计：已确认格 ---- */
.hk-rp-stat.is-ok b { color: #15803d; }

