﻿/* 检修助手 · 表单 + A4 告知卡 */

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

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

.mx-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.mx-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;
}
.mx-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mx-photo-slot.is-empty {
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
  cursor: pointer;
}
.mx-photo-slot.is-empty svg { width: 22px; height: 22px; opacity: .7; }
.mx-photo-slot.is-empty:disabled { opacity: .45; cursor: not-allowed; }
.mx-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;
}
.mx-photo-del svg { width: 14px; height: 14px; }

.mx-voice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.mx-voice-bar .btn { flex: none; }
.mx-voice-status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.mx-voice-status.is-on {
  color: #0f766e;
  font-weight: var(--fw-medium);
}
.mx-voice-status.is-on::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ef4444;
  vertical-align: middle;
  animation: mx-pulse 1s ease infinite;
}
@keyframes mx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-voice-status.is-on::before { animation: none; }
}

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

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

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

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

.mx-a4 {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  background: #fff;
  color: #1a1f2e;
  box-shadow: 0 10px 30px rgba(24, 39, 75, .12);
  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) {
  .mx-a4-stage { padding: 12px 8px 20px; }
  .mx-a4 {
    width: min(100%, 420px);
    min-height: calc(min(100%, 420px) * 1.414);
    padding: 4.8%;
  }
}

.mx-a4-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2.5px solid #0d9488;
}
.mx-a4-brand em {
  display: block;
  font-style: normal;
  font-size: 12px;
  letter-spacing: .14em;
  color: #0f766e;
  font-weight: var(--fw-medium);
}
.mx-a4-brand strong {
  display: block;
  margin-top: 2px;
  font-size: 21px;
  font-weight: var(--fw-semibold);
  color: #134e4a;
}
.mx-a4-badge {
  flex: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: .06em;
}

.mx-a4-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  align-items: flex-start;
}
.mx-a4-title {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  color: #0f172a;
}
.mx-a4-meta {
  flex: none;
  text-align: right;
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
}
.mx-a4-meta span { color: #1a1f2e; font-weight: var(--fw-medium); }

.mx-a4-sec { margin-top: 10px; }
.mx-a4-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .08em;
  color: #0f766e;
  font-weight: var(--fw-medium);
  margin-bottom: 4px;
}
.mx-a4-label::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: #14b8a6;
}
.mx-a4-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}
.mx-a4-work {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
}
.mx-a4-empty { font-size: 13px; color: #94a3b8; }

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

.mx-a4-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mx-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mx-chip {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}
.mx-chip.is-risk {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.mx-a4-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}
.mx-a4-col {
  padding: 8px 9px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.mx-a4-col.is-loto {
  background: #fff7ed;
  border-color: #fed7aa;
}
.mx-a4-col.is-loto .mx-a4-label { color: #c2410c; }
.mx-a4-col.is-loto .mx-a4-label::before { background: #ea580c; }
.mx-a4-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mx-a4-list li {
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 4px;
}
.mx-a4-list b { color: #0f766e; margin-right: 2px; }
.mx-a4-col.is-loto .mx-a4-list b { color: #c2410c; }

.mx-a4-sign {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  padding: 8px 0 0;
  border-top: 1px dashed #cbd5e1;
}

.mx-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;
}
.mx-a4-foot strong { color: #0f766e; font-weight: var(--fw-medium); }

.mx-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;
}
.mx-print-tip b { color: var(--ink); font-weight: var(--fw-medium); }

@media (max-width: 420px) {
  .mx-a4-tags,
  .mx-a4-two,
  .mx-a4-sign { grid-template-columns: 1fr; }
  .mx-a4-title-row { flex-direction: column; }
  .mx-a4-meta { text-align: left; }
}

@media print {
  .mx-a4 {
    width: 210mm !important;
    min-height: 297mm !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    padding: 10mm 11mm !important;
  }
  .mx-a4-photos.is-one .mx-a4-photo { height: 58mm; max-height: 58mm; }
  .mx-a4-photos.is-two .mx-a4-photo { height: 46mm; max-height: 46mm; }
  .mx-a4-tags,
  .mx-a4-two { grid-template-columns: 1fr 1fr !important; }
  .mx-a4-sign { grid-template-columns: 1fr 1fr 1fr !important; }
}
