/* =========================================================
   CANVA-EXACT A4 DOCUMENT SHEET (794 x 1123 px at 96dpi)
   ========================================================= */
.doc-sheet {
  width: 794px;
  min-height: 1123px;
  background: #ffffff;
  color: #111827;
  position: relative;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  font-family: 'Carlito', 'Calibri', 'Open Sans', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: text;
}

/* TOP INSTITUTIONAL HEADER */
.doc-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 44px 14px 28px;
  position: relative;
  z-index: 3;
}

.doc-crest {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.doc-crest svg,
.doc-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doc-org-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-org-line {
  font-family: 'Carlito', 'Calibri', 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #262626;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.28;
}

/* SPLIT HORIZONTAL BAR UNDER HEADER */
.doc-split-bar {
  width: 100%;
  height: 4px;
  display: flex;
  position: relative;
  z-index: 3;
}

.doc-split-bar .bar-left {
  width: 49%;
  background: #0a0a0a;
}

.doc-split-bar .bar-right {
  width: 51%;
  background: #9ca3af;
}

/* CENTER WATERMARK */
.doc-watermark {
  position: absolute;
  top: 53%;
  left: 48%;
  transform: translate(-50%, -50%);
  width: 570px;
  height: 570px;
  opacity: 0.075;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-watermark svg,
.doc-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* RIGHT MARGIN BARCODE + LEGAL PROTOCOL TEXT */
.doc-right-strip {
  position: absolute;
  right: 8px;
  top: 118px;
  bottom: 30px;
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 4;
  pointer-events: none;
}

.doc-barcode {
  width: 22px;
  height: 160px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.doc-protocol-svg {
  width: 28px;
  flex: 1;
  min-height: 0;
  display: block;
}

/* MAIN BODY CONTAINER */
.doc-body {
  flex: 1;
  padding: 16px 64px 20px 64px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

/* TITLE BLOCK */
.doc-title-block {
  text-align: center;
  margin-bottom: 20px;
}

.doc-main-title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 23px;
  font-weight: 700;
  color: #2d2d2d;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.doc-subtitle-1 {
  margin: 3px 0 1px;
  font-family: 'Alice', Georgia, serif;
  font-size: 11.5px;
  color: #4b5563;
  font-weight: 400;
}

.doc-subtitle-2 {
  margin: 0;
  font-family: 'Alice', Georgia, serif;
  font-size: 10.5px;
  color: #6b7280;
  font-weight: 400;
}

/* SECTION HEADERS WITH BOTTOM RULE */
.doc-sec-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #111827;
  border-bottom: 1.5px solid #1f2937;
  padding-bottom: 3px;
  margin: 14px 0 12px;
  letter-spacing: 0.4px;
}

.doc-sec-title.first {
  margin-top: 4px;
}

/* BIG CENTERED FEATURE LABEL (NOME:, SOLICITANTE DO DIVÓRCIO:) */
.doc-big-label {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #262626;
  text-transform: uppercase;
  margin: 2px 0 6px;
  letter-spacing: 0.5px;
}

.doc-med-label {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #262626;
  text-transform: uppercase;
  margin: 12px 0 5px;
  letter-spacing: 0.4px;
}

/* FORM BOX ROWS */
.doc-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.doc-field {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.doc-field.w-sm { flex: 0 0 130px; }
.doc-field.w-md { flex: 0 0 185px; }
.doc-field.w-lg { flex: 1.5; }
.doc-field.w-xl { flex: 2.2; }

.doc-field-label {
  font-size: 9.5px;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.25px;
}

.doc-box {
  border: 1.2px solid #4b5563;
  min-height: 31px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  word-break: break-word;
  line-height: 1.3;
}

.doc-box.left-align {
  justify-content: flex-start;
  text-align: left;
}

.doc-box.tall {
  min-height: 64px;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
}

.doc-box.oab-sig-box {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DIA / MÊS / ANO COMPACT TRIPLE BOXES */
.doc-date-triple {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.doc-date-triple .doc-field {
  flex: 0 0 auto;
}

.doc-date-triple .doc-box.day,
.doc-date-triple .doc-box.month {
  width: 46px;
}

.doc-date-triple .doc-box.year {
  width: 68px;
}

/* OBSERVATIONS PARAGRAPH (PLAIN STYLE IN ADOÇÃO & TROCA DE NOME) */
.doc-obs-plain {
  margin-top: 14px;
}

.doc-obs-heading {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: #111827;
  margin-bottom: 5px;
}

.doc-obs-text {
  font-size: 11px;
  line-height: 1.48;
  color: #1f2937;
  text-align: left;
}

/* MDT IMAGE PREVIEW INSIDE DOCUMENT (LIMPEZA DE FICHA) */
.doc-mdt-box {
  margin-top: 10px;
  border: 1.2px solid #4b5563;
  padding: 8px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
}

.doc-mdt-box img {
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
}

/* SIGNATURES FOOTER */
.doc-signatures {
  margin-top: auto;
  padding-top: 22px;
  padding-bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 56px;
}

.doc-sig-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 240px;
  max-width: 390px;
}

.doc-sig-pre {
  font-size: 10.5px;
  color: #374151;
  margin-bottom: 4px;
}

.doc-sig-script {
  font-family: 'Sacramento', 'Great Vibes', 'Dancing Script', 'Brush Script MT', cursive;
  font-size: 38px;
  line-height: 1.05;
  color: #1f2937;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.doc-sig-script.alt-font {
  font-family: 'Dancing Script', 'Caveat', cursive;
  font-size: 30px;
}

.doc-sig-script img {
  max-height: 48px;
  max-width: 210px;
  object-fit: contain;
}

.doc-sig-line {
  width: 210px;
  border-top: 1.5px solid #111827;
  margin: 2px 0 4px;
}

.doc-sig-role {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.doc-sig-cert {
  margin-top: 5px;
  font-size: 9px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.38;
  max-width: 360px;
}

/* DIAGONAL WATERMARK STAMP ([DEFINITIVA]) */
.doc-stamp {
  position: absolute;
  left: 16px;
  bottom: 92px;
  transform: rotate(42deg);
  font-size: 32px;
  font-weight: 700;
  color: rgba(156, 163, 175, 0.34);
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 2;
  text-transform: uppercase;
  white-space: nowrap;
}

/* BOTTOM GEOMETRIC SPLIT FOOTER BAR */
.doc-footer-bar {
  height: 20px;
  width: 100%;
  position: relative;
  z-index: 3;
  overflow: hidden;
  flex-shrink: 0;
}

.doc-footer-bar svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* EXTRA CUSTOM FIELDS RENDERED ON DOC */
.doc-custom-fields {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
