/* Todos los estilos del formulario se limitan a Jesús del Norte. */
#form-nvx-document.nvx-jesus-form {
  --jesus-blue: #174b78;
  --jesus-border: #d3dde7;
  width: 100%; min-width: 0; max-width: none !important;
  padding: 14px; border-radius: 8px; background: #fff; color: #21374b;
  box-sizing: border-box;
}
.nvx-jesus-form *, .nvx-jesus-form *::before, .nvx-jesus-form *::after { box-sizing: border-box; }
.nvx-jesus-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.nvx-jesus-editor, .nvx-jesus-preview { min-width: 0; max-width: 100%; }
.nvx-jesus-editor h3 { margin: 0 0 20px; color: var(--jesus-blue); font-size: 19px; line-height: 1.3; }
.nvx-jesus-group { min-width: 0; margin: 0 0 18px; padding: 12px 0 0; border: 0; border-top: 1px solid #e7edf3; }
.nvx-jesus-group legend { padding: 0 8px 0 0; color: var(--jesus-blue); font-size: 13px; font-weight: 700; }
.nvx-jesus-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.nvx-jesus-field { min-width: 0; }
.nvx-jesus-field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.nvx-jesus-field input, .nvx-jesus-field select, .nvx-jesus-field textarea {
  display: block; width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 9px 10px;
  border: 1px solid var(--jesus-border); border-radius: 7px; background: #fff; color: #21374b;
  font: 14px/1.4 Arial, Helvetica, sans-serif; box-shadow: none;
}
.nvx-jesus-field textarea { min-height: 76px; max-height: 380px; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; overflow-y: auto; }
/* La visibilidad de estos controles pertenece a este formulario, aunque el
   portal conserve reglas generales para otros generadores. */
#form-nvx-document.nvx-jesus-form .nvx-jesus-editor .nvx-jesus-group,
#form-nvx-document.nvx-jesus-form .nvx-jesus-editor .nvx-jesus-field,
#form-nvx-document.nvx-jesus-form .nvx-jesus-editor .nvx-jesus-field > label,
#form-nvx-document.nvx-jesus-form .nvx-jesus-editor [data-jesus-field] {
  display: block !important; visibility: visible !important; opacity: 1 !important;
}
#form-nvx-document.nvx-jesus-form .nvx-jesus-editor .nvx-jesus-grid {
  display: grid !important; visibility: visible !important;
}
.nvx-jesus-timing-label { margin: 12px 0 8px; font-size: 12px; font-weight: 600; }
.nvx-jesus-total { margin-top: 14px; }
.nvx-jesus-field select:disabled { opacity: 1; background: #f5f8fb; color: var(--jesus-blue); }
.nvx-jesus-field input[readonly] { background: #f5f8fb; color: var(--jesus-blue); font-weight: 600; }
.nvx-jesus-field input:focus, .nvx-jesus-field select:focus, .nvx-jesus-field textarea:focus { outline: 2px solid #a5c6e4; outline-offset: 1px; border-color: var(--jesus-blue); }
.nvx-jesus-submit { display: block; width: 100%; min-height: 44px; padding: 11px 15px; border: 0; border-radius: 7px; background: var(--jesus-blue); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.nvx-jesus-submit:disabled { opacity: .6; cursor: wait; }
.nvx-jesus-status { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.nvx-jesus-status:empty { display: none; }
.nvx-jesus-status.nvx-status-error { color: #a52626; }
.nvx-jesus-preview-title { padding: 0 0 10px; font-size: 12px; color: #566b7e; font-weight: 600; }
.nvx-jesus-paper-scroll { max-width: 100%; min-width: 0; overflow: auto; overscroll-behavior-inline: contain; border: 1px solid #dce4ec; border-radius: 7px; background: #edf2f6; }
.nvx-jesus-paper-scroll:focus-visible { outline: 2px solid #a5c6e4; }
.nvx-jesus-paper-scroll iframe { display: block; width: 794px; max-width: none; height: 1123px; border: 0; background: #fff; }
@media (max-width: 599px) {
  .nvx-jesus-field input, .nvx-jesus-field select, .nvx-jesus-field textarea { font-size: 16px; }
  .nvx-jesus-attention { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nvx-jesus-attention .nvx-jesus-field:first-child { grid-column: 1 / -1; }
}
@media (min-width: 600px) {
  #form-nvx-document.nvx-jesus-form { padding: 20px; }
  .nvx-jesus-patient, .nvx-jesus-rest { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nvx-jesus-rest .nvx-jesus-field:last-child { grid-column: 1 / -1; }
  .nvx-jesus-attention { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(70px, .65fr); }
}
@media (min-width: 1200px) {
  .nvx-jesus-layout { grid-template-columns: minmax(310px, 380px) minmax(0, 1fr); align-items: start; }
}
@media print {
  /* Mantiene la impresión de la hoja si se abre la vista del documento. */
  .nvx-jesus-editor, .nvx-jesus-preview-title { display: none !important; }
}
