/* Памятка: две страницы A4. На экране — превью листов, при печати — только листы. */

.memo-wrap { background: #E5E7EB; padding: 20px 0; border-radius: var(--radius); overflow-x: auto; }
.m-page {
  width: 210mm; min-height: 297mm; margin: 0 auto 20px; background: #fff;
  padding: 11mm 14mm 9mm; position: relative; color: #0F172A;
  font-size: 10.5pt; line-height: 1.4; box-shadow: 0 2px 10px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
}
.m-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--accent); padding-bottom: 4mm; margin-bottom: 5mm; }
.m-head img { height: 12mm; width: auto; }
.m-contacts { text-align: right; font-size: 9pt; color: #334155; line-height: 1.5; }
.m-title { text-align: center; font-size: 19pt; font-weight: 800; color: var(--navy); margin: 0 0 2mm; letter-spacing: .02em; }
.m-sub { text-align: center; font-size: 12pt; font-weight: 700; color: #334155; margin-bottom: 5mm; }
.m-deadline { display: grid; grid-template-columns: 34% 66%; background: #B91C1C; color: #fff; font-weight: 800; font-size: 10.5pt; margin-bottom: 5mm; }
.m-deadline span { padding: 3.5mm 4mm; text-align: center; }
.m-deadline span:first-child { border-right: 2px solid #fff; }
.m-h { font-size: 12pt; font-weight: 800; color: var(--navy); margin: 4mm 0 2.5mm; }
.m-table, .m-req, .m-steps { width: 100%; border-collapse: collapse; margin-bottom: 4mm; }
.m-table th { background: #E8EEF7; text-align: left; font-size: 9.5pt; padding: 2.5mm 3mm; border: 1px solid #CBD5E1; }
.m-table td { padding: 3mm; border: 1px solid #CBD5E1; vertical-align: top; }
.m-sum { text-align: center; font-weight: 800; white-space: nowrap; width: 26%; }
.m-qr { display: flex; gap: 6mm; align-items: center; border: 1px solid #CBD5E1; background: #F8FAFC; padding: 3mm 4mm; margin-bottom: 3mm; break-inside: avoid; }
.m-qr svg { width: 31mm; height: 31mm; flex: none; }
.m-num { width: 9mm; text-align: center; font-weight: 800; }
.m-purpose { font-size: 9.5pt; color: #334155; }
.m-note { border: 1px solid #CBD5E1; background: #EEF2F7; padding: 3.5mm 4mm; margin-bottom: 3mm; }
.m-note.ok { background: #ECFDF5; border-color: #A7F3D0; }
.m-note.warn { background: #FFF7ED; border-color: #FDBA74; }
.m-req td { padding: 1.4mm 2.5mm; border: 1px solid #CBD5E1; font-size: 9pt; vertical-align: top; }
.m-req td:first-child { background: #F8FAFC; width: 42%; color: #334155; }
.m-steps td { padding: 2.2mm 3mm; border: 1px solid #CBD5E1; }
.m-steps td:first-child { width: 12mm; text-align: center; font-weight: 800; background: #E8EEF7; }
.m-small { font-size: 9pt; color: #475569; margin-top: 4mm; }
.m-foot { margin-top: auto; padding-top: 4mm; border-top: 1px solid #CBD5E1; display: flex; justify-content: space-between; font-size: 8pt; color: #64748B; }

@page { size: A4; margin: 0; }
@media print {
  body.printing-memo > *:not(main) { display: none !important; }
  body.printing-memo main > *:not(#memoArea) { display: none !important; }
  body.printing-memo main { padding: 0 !important; max-width: none !important; }
  body.printing-memo #memoArea .no-print { display: none !important; }
  .memo-wrap { background: none; padding: 0; overflow: visible; }
  .m-page { margin: 0; box-shadow: none; width: 210mm; height: 297mm; min-height: 0; page-break-after: always; break-after: page; overflow: hidden; }
  .m-page:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
