/* Ventanas compartidas: formulario desplazable con cabecera y acciones visibles. */
.dashboard-page dialog.app-dialog { width:min(760px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 48px)!important; padding:0!important; border:1px solid #d9e7f0!important; border-radius:20px!important; background:#fff; color:#18354b; box-shadow:0 24px 80px #18354b33!important; overflow:hidden; }
.dashboard-page dialog.app-dialog::backdrop,.doctor-profile-dialog::backdrop { background:#102d4599; backdrop-filter:blur(4px); }
.dashboard-page dialog.app-dialog .app-dialog-form { display:flex; flex-direction:column; max-height:calc(100dvh - 50px); padding:0!important; margin:0; min-height:0; }
.app-dialog-header { display:flex; align-items:center!important; justify-content:space-between; gap:18px; flex-shrink:0; padding:24px 28px!important; margin:0!important; border-bottom:1px solid #d9e7f0!important; background:#f0f9ff; }
.app-dialog-header h2 { margin:0!important; font-size:21px; line-height:1.4; font-weight:700; letter-spacing:-.4px; overflow-wrap:anywhere; }
.app-dialog-header .btn-close { margin:0; padding:10px; flex-shrink:0; border-radius:10px; }
.app-dialog-header .btn-close:hover { background-color:#dceef9; }
.app-dialog-header p { line-height:1.6; }
.app-dialog-header p:empty { display:none; }
.app-dialog-body { overflow-y:auto; overscroll-behavior:contain; min-height:0; padding:28px; }
.app-dialog-body .form-label { margin-bottom:8px; font-size:13px; line-height:1.5; font-weight:600; color:#29495f; }
.app-dialog-body :is(.form-control,.form-select) { min-height:46px; border-color:#cddfe9; border-radius:9px; font-size:14px; color:#18354b; }
.app-dialog-body .input-group > :not(:first-child) { border-top-left-radius:0; border-bottom-left-radius:0; }
.app-dialog-body .input-group > :not(:last-child) { border-top-right-radius:0; border-bottom-right-radius:0; }
.app-dialog-body .input-group-text { background:#f5f9fc; color:#668397; border-color:#cddfe9; }
.app-dialog-body .form-control::placeholder { color:#7a8f9f; font-size:13px; }
.app-dialog-body textarea { resize:vertical; line-height:1.7; }
.app-dialog-body :is(.form-text,small.text-secondary) { display:block; margin-top:7px; color:#627c8f; font-size:12px; line-height:1.65; }
.app-dialog-body .form-text.d-flex { display:flex; }
.app-dialog-body input[type=file] { font-size:12px; }
.app-dialog-body input[type=file]::file-selector-button { background:#eaf6ff; color:#075985; }
.app-dialog-body fieldset { min-width:0; }
.app-dialog-body fieldset.border { background:#f8fbfd; border-color:#d9e7f0!important; border-radius:14px!important; padding:20px!important; }
.app-dialog-body legend { color:#29495f; font-size:14px!important; }
.app-dialog-body > .form-check,.app-dialog-body fieldset > .form-check { padding:14px 16px 14px 42px; border:1px solid #d9e7f0; border-radius:10px; background:#f0f9ff; font-size:13px; line-height:1.6; }
.app-dialog-body .form-check-input { cursor:pointer; }
.app-dialog-footer { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px!important; flex-shrink:0; padding:18px 28px!important; margin:0!important; border-top:1px solid #e3edf5!important; background:#f8fbfd; }
.app-dialog-footer .btn { min-height:44px; margin:0; padding:10px 18px; border-radius:10px; font-size:14px; font-weight:600; }
.app-dialog-footer .btn-light { background:white; color:#526c80; border-color:#d9e7f0!important; }
#portalGuardar { order:1; }
.dashboard-page #triageDialog.app-dialog { width:min(1020px,calc(100vw - 32px)); }
#triageDialog .app-dialog-body { background:#f8fbfd; }
#triageFields > h3 { display:flex; align-items:center; margin:8px 0 0; padding:18px 20px!important; border:1px solid #d9e7f0; border-bottom:0!important; border-radius:12px 12px 0 0; background:#eaf6ff; color:#075985!important; font-size:14px; font-weight:700; }
#triageFields > .row { padding:20px; margin:0 0 22px!important; border:1px solid #d9e7f0; border-top:0; border-radius:0 0 12px 12px; background:white; }
#triageFields > h3 + p { padding:0 20px 12px; margin:0; background:#eaf6ff; border-inline:1px solid #d9e7f0; font-size:12px; line-height:1.7; }
#triageFields > p:last-child { margin:0; padding:16px 18px; border:1px solid #d9e7f0; border-radius:12px; background:white; font-size:12px; line-height:1.7; }
#triageDialog .app-dialog-footer #cancelTriage { margin-right:auto; }
#specialtyDialog.app-dialog { width:min(820px,calc(100vw - 32px)); }
#specialtyDialog #specialtyImagePreview { background:#edf6fc; border:1px solid #d9e7f0; padding:8px; }
#specialtyDialog #removeSpecialtyImage { color:#9f2d35; padding-left:0; }
/* Bootstrap y confirmaciones mantienen la misma identidad. */
.modal-clean .modal-header.bg-primary { background:#f0f9ff!important; color:#18354b!important; border-bottom:1px solid #d9e7f0; }
.modal-clean .modal-header .btn-close-white { filter:none; }
.modal-clean .modal-title-icon { color:#0369a1; background:white; border:1px solid #c6e3f3; }
.modal-clean .modal-header .opacity-75 { color:#526c80; opacity:1!important; }
.swal2-popup { border:1px solid #d9e7f0!important; border-radius:20px!important; padding-bottom:24px!important; color:#18354b!important; font-family:inherit!important; }
.swal2-title { font-size:23px!important; letter-spacing:-.4px; }
.swal2-html-container { font-size:14px!important; line-height:1.7!important; color:#526c80!important; }
.swal2-actions { gap:10px; }
.swal2-actions button { min-height:44px; border-radius:10px!important; font-size:14px!important; font-weight:600!important; }
.swal2-cancel { background:#526c80!important; }
.public-specialty-dialog { border:1px solid #d9e7f0; border-radius:20px; box-shadow:0 24px 80px #18354b33; }
.public-specialty-dialog::backdrop { background:#102d4599; backdrop-filter:blur(4px); }
@media(max-width:575.98px) {
 .dashboard-page dialog.app-dialog { width:calc(100vw - 24px)!important; max-height:calc(100dvh - 24px)!important; border-radius:16px!important; }
 .dashboard-page dialog.app-dialog .app-dialog-form { max-height:calc(100dvh - 26px); }
 .app-dialog-header,.app-dialog-body { padding:20px!important; }
 .app-dialog-header h2 { font-size:19px; }
 .app-dialog-footer { padding:16px 20px!important; }
 .app-dialog-footer .btn { flex:1 1 120px; padding-inline:12px; }
 #triageDialog .app-dialog-footer #cancelTriage { flex-basis:100%; margin-right:0; }
 #triageFields > .row { padding:12px; }
 #triageFields > h3 { padding:16px!important; }
 .swal2-popup { width:calc(100vw - 32px)!important; }
}
@media(prefers-reduced-motion:reduce) { .app-dialog::backdrop,.doctor-profile-dialog::backdrop,.public-specialty-dialog::backdrop { backdrop-filter:none!important; } }
