.modal {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    background-color: #fafafa;
    padding: 0;
    max-height: 70%;
    width: 55%;
    margin: auto;
    overflow-y: auto;
    border-radius: 2px;
    will-change: top, opacity;
    height: 210px;
    border-radius: 8px;
}

/* Regla definitiva de altura de modales. */
html body .modal,
html body #modalUploadDoc .upContent {
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 32px) !important;
}
html body .modal.modal-fixed-footer .modal-content {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 104px) !important;
    overflow-y: auto !important;
}
html body .modal .modal-content,
html body .modal .modal-footer {
    height: auto !important;
    min-height: 0 !important;
}
html body #deleteModal {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
.z-depth-5, .modal {
    -webkit-box-shadow: none;
    box-shadow: none;
}
.modal .modal-content {
    padding: 24px;
}
.red-text.text-darken-2 {
    color: #D32F2F !important;
}
.red-text {
    color: #F44336 !important;
}
img {
    border-style: none;
}
.danger-title i {
    font-size: 28px;
}
.material-icons {
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: 'liga';
    -moz-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
}
.red-text.text-darken-2 {
    color: #D32F2F !important;
}
.danger-title {
    display: flex;
    gap: 10px;
    align-items: center;
}
h5 {
    font-size: 20px;
    line-height: 110%;
    margin: 1.0933333333rem 0 .656rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.3;
}
.grey-text {
    color: #9e9e9e !important;
}
p {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}

.modal .modal-footer {
    border-radius: 0 0 2px 2px;
    background-color: #fafafa;
    padding: 4px 6px;
    height: 56px;
    width: 100%;
    text-align: right;
    padding-right: 25px !important;
    padding-left: 25px !important;

}

.deletebtn {
     background: #fff0f0 !important;
    border: none;
    color: #ff9189 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    /* box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px; */
    height: 32.4px;
    line-height: 32.4px;
    font-size: 13px;
    border-radius: 4px;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 1px;
}

.btn, .btn-large, .btn-small {
    text-decoration: none;
    color: #000000;
    /* background-color: #26a69a; */
    text-align: center;
    letter-spacing: .5px;
    -webkit-transition: background-color .2s ease-out;
    transition: background-color .2s ease-out;
    cursor: pointer;
    border: solid 1px transparent;
}

.deletebtn:hover {
    background: #fff6f7 !important;
    
    border: solid 1px #ffd4d4;
    transition: ease all 0.5s;

}



.modal-overlay {
    position: fixed;
    z-index: 999;
    top: -25%;
    left: 0;
    bottom: 0;
    right: 0;
    height: 125%;
    width: 100%;
    /* background: #000; */
    display: none;
    will-change: opacity;
    background: rgb(0 0 0 / 31%);}

    .btn, .btn-large, .btn-small, .btn-flat {
    /* border: none; */
    border-radius: 4px;
    display: inline-block;
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    text-transform: uppercase;
    vertical-align: middle;
    -webkit-tap-highlight-color: transparent;
}

.verbtn {
    background: #e6e6e6 !important;
    border: solid 1px transparent;
    color: #000000 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    /* box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px; */
    text-decoration: none;

}
.verbtn:hover {
    background: #d6d6d6 !important;
    box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
    border: solid 1px #a1a1a1;
    transition: ease all 0.5s;
    cursor: pointer;
    color: #000000 !important;
}

/* Sistema visual compartido por todos los modales de carga de PDF. */
html body #modalUploadDoc .upContent {
    border: 1px solid #dce5ee !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 24px 64px rgba(22, 36, 58, .16) !important;
}

html body #modalUploadDoc .modaldocuheader {
    display: flex !important;
    min-height: auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    padding: 20px 22px !important;
    border-bottom: 1px solid #e8eef4 !important;
    border-radius: 0 !important;
    background: #fff !important;
    background-image: none !important;
    color: #223352 !important;
}

html body #modalUploadDoc .modaldocuheader::before {
    content: 'PDF';
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: #eaf7fc;
    color: #168db5;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
}

html body #modalUploadDoc .modalDoctit {
    flex: 1;
    margin: 0 !important;
    color: #223352 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    text-transform: none !important;
}

html body #modalUploadDoc .cerrarModal {
    flex: 0 0 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #7a889b !important;
    font-size: 16px !important;
}

html body #modalUploadDoc .cerrarModal:hover {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

html body #modalUploadDoc form button {
    box-sizing: border-box !important;
    min-width: 110px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 18px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: #e6e6e6 !important;
    color: #111 !important;
    box-shadow: none !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 36px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html body #modalUploadDoc form button:hover:not(:disabled) {
    border-color: #a1a1a1 !important;
    background: #d6d6d6 !important;
}

html body #modalUploadDoc form .deletebtn {
    border-color: #ffd4d4 !important;
    background: #fff6f7 !important;
    color: #ff9189 !important;
}

html body #modalUploadDoc form .deletebtn:hover {
    background: #ffedef !important;
}

html body .modal .modal-footer .btn-flat,
html body .modal .modal-footer button {
    box-sizing: border-box !important;
    min-width: 110px !important;
    height: 38px !important;
    padding: 0 18px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: #e6e6e6 !important;
    color: #111 !important;
    box-shadow: none !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 36px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html body .modal .modal-footer .deletebtn {
    border-color: #ffd4d4 !important;
    background: #fff6f7 !important;
    color: #c94b4b !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions .deletebtn:hover:not(:disabled),
html body .modal .modal-footer .deletebtn:hover:not(:disabled) {
    border-color: #f3aaaa !important;
    background: #ffe9eb !important;
    color: #ff9189 !important;
}

@media (max-width: 680px) {
    html body #modalUploadDoc .modaldocuheader {
        padding: 16px !important;
    }
}

/* Los modales se dimensionan por su contenido, no por alturas heredadas. */
html body .modal,
html body #modalUploadDoc .upContent {
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
}

html body .modal.modal-fixed-footer .modal-content {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 104px) !important;
    max-height: calc(100dvh - 104px) !important;
    overflow-y: auto !important;
}

html body .modal .modal-content,
html body .modal .modal-footer {
    height: auto !important;
    min-height: 0 !important;
}

html body #deleteModal {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Sistema final de acciones: prevalece sobre estilos inline y heredados. */
html body #deleteModal .danger-title h5,
html body #pdfModal .modal-content h5 {
    margin: 0 !important;
    color: #223352 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions,
html body .modal .modal-footer {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin: 20px -18px -18px !important;
    padding: 16px 22px !important;
    border-top: 1px solid #e8eef4 !important;
    background: #f8fafc !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions button,
html body .modal .modal-footer a,
html body .modal .modal-footer button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    min-width: 110px !important;
    width: auto !important;
    height: 38px !important;
    min-height: 38px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: #e6e6e6 !important;
    color: #111 !important;
    box-shadow: none !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 36px !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer !important;
    transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions button:hover:not(:disabled),
html body .modal .modal-footer a:hover,
html body .modal .modal-footer button:hover:not(:disabled) {
    border-color: #a1a1a1 !important;
    background: #d6d6d6 !important;
    color: #111 !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions .deletebtn,
html body .modal .modal-footer .deletebtn {
    border-color: #ffd4d4 !important;
    background: #fff6f7 !important;
    color: #ff9189 !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions .deletebtn:hover:not(:disabled),
html body .modal .modal-footer .deletebtn:hover:not(:disabled) {
    border-color: #f3aaaa !important;
    background: #ffe9eb !important;
    color: #ff9189 !important;
}

html body #modalUploadDoc #formUploadDoc .modal-actions button:disabled,
html body .modal .modal-footer button:disabled {
    opacity: .42 !important;
    cursor: not-allowed !important;
}

html body .modal .modal-footer {
    margin: 0 !important;
    padding: 16px 22px !important;
}

@media (max-width: 680px) {
    html body #modalUploadDoc #formUploadDoc .modal-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        margin: 20px -16px -16px !important;
        padding: 16px !important;
    }

    html body #modalUploadDoc #formUploadDoc .modal-actions button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Regla final: altura intrínseca para todos los modales. */
html body .modal,
html body #modalUploadDoc .upContent {
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
}

html body .modal.modal-fixed-footer .modal-content {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 104px) !important;
    max-height: calc(100dvh - 104px) !important;
    overflow-y: auto !important;
}

html body .modal .modal-content,
html body .modal .modal-footer {
    height: auto !important;
    min-height: 0 !important;
}

html body #deleteModal {
    height: auto !important;
    min-height: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

html body #pdfModal {
    border-radius: 12px !important;
    overflow: hidden !important;
}
