/* Editor-only design: never style the document or its export clone. */
.document-workspace { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:24px; align-items:start; width:calc(100% - 48px); max-width:1200px; margin:32px auto; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor { width:100%; max-width:none; margin:0; padding:24px; border:1px solid #70577e; border-radius:20px; background:#251b32; color:#fff6fa; box-shadow:none; min-width:0; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor > h1 { color:#fff6fa; text-align:left!important; text-transform:none; text-shadow:none; font-size:clamp(1.5rem, 2.5vw, 2rem); line-height:1.25; margin:0 0 24px; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form { display:flex; flex-direction:column; gap:24px; }
.document-intro { color:#d9cbe0; font-size:1rem; line-height:1.6; margin:0; }
.document-group { min-width:0; border:1px solid #70577e; border-radius:14px; padding:24px; margin:0; display:flex; flex-direction:column; gap:20px; }
.document-group legend { float:none; width:auto; padding:0 8px; margin:0; color:#fff6fa; font-size:1.15rem; font-weight:700; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form .document-group > div { margin:0!important; min-width:0; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form label { color:#fff6fa; text-align:left!important; font-size:1rem; line-height:1.4; letter-spacing:normal; text-transform:none!important; margin-bottom:8px; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form input, .document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form textarea, .document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form select { width:100%; min-width:0; min-height:48px; padding:12px; border:1px solid #a48bb4; border-radius:8px; background:#191321!important; color:#fff6fa; font-size:16px; line-height:1.5; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form input::placeholder { color:#c8bbd1; opacity:1; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form input[type=file] { white-space:normal; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form input::file-selector-button { padding:8px; border:1px solid #a48bb4; border-radius:6px; background:#352540; color:#fff6fa; margin-right:8px; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form .small { color:#d9cbe0; overflow-wrap:anywhere; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form button { width:100%; min-height:48px; padding:12px 20px; background:#ffad9f!important; border:2px solid #ffad9f!important; color:#251329!important; font-weight:700; font-size:1.1rem; border-radius:10px; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form button:hover { background:#ffc6bc!important; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form :focus-visible, .document-preview-scroll:focus-visible { outline:3px solid #ffe0a3!important; outline-offset:4px; box-shadow:none!important; }
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form [aria-invalid=true] { border:2px solid #ffb2c2; }
.document-field-error { color:#ffc5d0; font-size:.95rem; margin:8px 0 0; }
.document-preview { min-width:0; padding:24px; border:1px solid #70577e; border-radius:20px; background:#251b32; color:#fff6fa; }
.document-preview > h2 { color:#fff6fa; font-size:1.25rem; margin:0 0 16px; }
.document-preview > p { color:#d9cbe0; line-height:1.6; }
.document-preview-scroll { max-width:100%; overflow:auto; border-radius:8px; }
.document-preview-scroll:has(#dadosCertidao:empty) { min-height:200px; border:1px dashed #70577e; background:linear-gradient(135deg,#2c2038,#211729); }
.document-preview-note { margin:20px 0 0; font-size:.9rem; }
.document-preview button { min-height:44px; }
@media(max-width:1000px) { .document-workspace { grid-template-columns:minmax(0,1fr); max-width:760px; } }
@media(max-width:480px) { .document-workspace { width:calc(100% - 24px); margin:24px auto; gap:16px; } .document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor, .document-preview { padding:16px; border-radius:14px; } .document-group { padding:16px; } }
.document-preview #dadosCertidao > .container.d-flex, .document-preview .certidao-actions { flex-wrap:wrap; gap:12px; }
.document-preview #dadosCertidao > .container.d-flex > button { margin:0!important; max-width:100%; white-space:normal; }
/* Native file buttons must not be clipped by legacy fixed input heights. */
.document-page :is(#weddingCertificate, #adoptionCertificate, #walletOabContainer, #walletCrmContainer).document-editor :is(#certificateForm, #adoptioncertificate, #mandadoDePrisaoForm, #sentencaJulgamentoForm, #certificateCRMForm, #certificateOabForm, #certificateIdosoForm, #certificatePorteDeArmaForm, #pregnancyForm, form).document-form input[type=file] { height:auto; min-height:64px; padding:8px; }
.document-page .document-form input::file-selector-button { min-height:44px; }
/* The legacy footer has a 400px legal-links row and nowrap copyright. */
@media(max-width:768px) {
    .document-page footer .copyright-section { width:100%; min-width:0; }
    .document-page footer .copyright-section p { white-space:normal; overflow-wrap:anywhere; }
    .document-page footer .copyright-section div:nth-child(2) { width:100%; max-width:400px; flex-wrap:wrap; }
}
/* Export/reset actions are secondary and must contrast with the dark preview. */
.document-page .document-preview button { background:#352540!important; color:#fff6fa!important; border:1px solid #a48bb4!important; padding:10px 16px; border-radius:8px; }
.document-page .document-preview button:hover:not(:disabled) { background:#4a3459!important; }
.document-page .document-preview button:focus-visible { outline:3px solid #ffe0a3!important; outline-offset:4px; }
.document-page .document-preview button:disabled { opacity:.6; }
/* Bootstrap 4 upload wrappers otherwise crop the native 64px input. */
.document-page .document-form .custom-file { display:flex; flex-direction:column; gap:8px; height:auto; min-height:64px; min-width:0; overflow:visible; }
