﻿/* 典型隐患 · 表单 + A4 学习卡 */

.hz-page { padding-bottom: 28px; }
.hz-hero {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(118deg, #b91c1c 0%, #dc2626 48%, #f07167 100%);
  box-shadow: 0 12px 28px rgba(185, 28, 28, .2);
}
.hz-hero-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  flex: none;
}
.hz-hero-ico svg { width: 22px; height: 22px; }
.hz-hero h2 { font-size: 18px; font-weight: var(--fw-semibold); }
.hz-hero p { margin-top: 3px; font-size: 13px; opacity: .9; }

.hz-form .field + .field { margin-top: 12px; }
.hz-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.hz-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.hz-photo-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: #f7f9fc;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.hz-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hz-photo-slot.is-empty {
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
  cursor: pointer;
}
.hz-photo-slot.is-empty svg { width: 22px; height: 22px; opacity: .7; }
.hz-photo-slot.is-empty:disabled { opacity: .45; cursor: not-allowed; }
.hz-photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20, 24, 32, .72);
  color: #fff;
  display: grid;
  place-items: center;
}
.hz-photo-del svg { width: 14px; height: 14px; }

.hz-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.hz-actions .btn { width: 100%; }

.hz-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.5;
}
.hz-loading i {
  width: 16px;
  height: 16px;
  border: 2px solid #fecaca;
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: hz-spin .8s linear infinite;
  flex: none;
}
@keyframes hz-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hz-loading i { animation: none; }
}

.hz-preview-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hz-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hz-preview-head h3 { font-size: 16px; font-weight: var(--fw-medium); }
.hz-preview-ops { display: flex; gap: 8px; flex-wrap: wrap; }

.hz-a4-stage {
  width: 100%;
  overflow: auto;
  padding: 8px 0 16px;
  background: #e8ecf2;
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
}

.hz-a4 {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  background: #fff;
  color: #1a1f2e;
  box-shadow: 0 10px 30px rgba(24, 39, 75, .12);
  transform-origin: top center;
  box-sizing: border-box;
  padding: 10mm 11mm 9mm;
  display: flex;
  flex-direction: column;
  font-family: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (max-width: 860px) {
  .hz-a4-stage { padding: 12px 8px 20px; }
  .hz-a4 {
    width: min(100%, 420px);
    min-height: calc(min(100%, 420px) * 1.414);
    padding: 4.8%;
  }
}

.hz-a4-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2.5px solid #dc2626;
}
.hz-a4-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hz-a4-brand em {
  font-style: normal;
  font-size: 12px;
  letter-spacing: .16em;
  color: #b91c1c;
  font-weight: var(--fw-medium);
}
.hz-a4-brand strong {
  font-size: 21px;
  font-weight: var(--fw-semibold);
  color: #7f1d1d;
  letter-spacing: .04em;
}
.hz-a4-issue {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff;
  font-size: 13px;
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(185, 28, 28, .25);
}
.hz-a4-issue b { font-size: 17px; font-weight: var(--fw-semibold); letter-spacing: .02em; }

.hz-a4-title {
  margin: 10px 0 4px;
  font-size: 18px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  color: #1a1f2e;
}
.hz-a4-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}
.hz-a4-meta span { color: #1a1f2e; font-weight: var(--fw-medium); }
.hz-a4-summary {
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
  margin-bottom: 6px;
}

.hz-a4-sec { margin-top: 8px; }
.hz-a4-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .08em;
  color: #b91c1c;
  font-weight: var(--fw-medium);
  margin-bottom: 4px;
}
.hz-a4-label::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: #dc2626;
}
.hz-a4-body {
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.hz-a4-photos {
  margin-top: 4px;
  display: grid;
  gap: 8px;
}
.hz-a4-photos.is-one { grid-template-columns: 1fr; }
.hz-a4-photos.is-two { grid-template-columns: 1fr 1fr; }
.hz-a4-photo {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hz-a4-photos.is-one .hz-a4-photo {
  max-height: 62mm;
  height: 62mm;
}
.hz-a4-photos.is-two .hz-a4-photo {
  max-height: 48mm;
  height: 48mm;
}
.hz-a4-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.hz-a4-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hz-a4-list > li { margin-bottom: 6px; }
.hz-a4-item-h {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.hz-a4-item-h b { color: #b91c1c; font-weight: var(--fw-medium); }
.hz-a4-item-h strong {
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  color: #1a1f2e;
}
.hz-a4-list p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
  padding-left: 16px;
}
.hz-sev {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: var(--fw-medium);
}
.hz-sev-high { background: #fee2e2; color: #b91c1c; }
.hz-sev-mid { background: #ffedd5; color: #c2410c; }
.hz-sev-low { background: #e0f2fe; color: #0369a1; }

.hz-a4-list-plain > li {
  font-size: 12.5px;
  line-height: 1.55;
  color: #334155;
  margin-bottom: 4px;
  padding-left: 0;
}
.hz-a4-list-plain b { color: #b91c1c; margin-right: 4px; }

.hz-a4-reflect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hz-a4-box {
  padding: 8px 9px;
  border-radius: 8px;
  background: #fff7f7;
  border: 1px solid #fecaca;
}
.hz-a4-box h3 {
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  color: #991b1b;
  margin-bottom: 4px;
}
.hz-a4-box ul {
  margin: 0;
  padding-left: 16px;
}
.hz-a4-box li {
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 3px;
}

.hz-a4-note {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.hz-a4-note .hz-a4-body { font-size: 12.5px; color: #7f1d1d; }

.hz-a4-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
}
.hz-a4-foot strong { color: #b91c1c; font-weight: var(--fw-medium); }

.hz-print-tip {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #edf4ff;
  border: 1px solid rgba(47, 124, 246, .14);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
}
.hz-print-tip b { color: var(--ink); font-weight: var(--fw-medium); }

@media (max-width: 420px) {
  .hz-a4-reflect-grid { grid-template-columns: 1fr; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  .hz-a4 {
    width: 210mm !important;
    min-height: 297mm !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 10mm 11mm !important;
  }
  .hz-a4-photos.is-one .hz-a4-photo { height: 62mm; max-height: 62mm; }
  .hz-a4-photos.is-two .hz-a4-photo { height: 48mm; max-height: 48mm; }
  .hz-a4-reflect-grid { grid-template-columns: 1fr 1fr !important; }
}
