
    
    header{
        position: sticky;
        top: 0;
        z-index: 10;
        background-color:#365E99;
        display:flex;
        justify-content:space-between;
        align-items:center;
        padding:15px 5%;
    }

    nav{
        color: white;
        background-color: rgb(40, 89, 194);
        display: flex;
        justify-content: center;
        gap: 5%;
        padding: 2.5%
    }

    header a{
        color: white;
        text-decoration: none;
        font-family: 'Segoe UI', sans-serif;
    }



    input{
        border-radius: 3px;
    }

    .form_qr_hidden {
        display: none;
    }

    h1{
        padding-bottom: 20px;
        padding-top: 20px;
    }

    h2{
        padding-bottom: 20px;
        padding-top: 20px;
    }

    .preview {
        position: relative;
        width: 90%;
        height: 650px;
        margin: 25px auto;
        border: 1px solid #bcbcbc;
        border-radius: 10px;
        background-color: #f5f5f5;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #preview_viewer {
        display: block;
        width: 100%;
        height: 100%;
        border: none;
    }

    .preview-loading {
        position: absolute;
        inset: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 14px;
        background-color: rgba(245, 245, 245, 0.92);
        color: #365e99;
        font-size: 16px;
    }

    .preview-loading[hidden],
    .preview-actions[hidden] {
        display: none;
    }

    .loading-spinner {
        width: 38px;
        height: 38px;
        border: 4px solid #d9e3f2;
        border-top-color: #365e99;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .preview-actions {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin: -12px auto 25px;
    }

    .preview-actions a {
        padding: 8px 14px;
        border: 1px solid #365e99;
        border-radius: 3px;
        background-color: #365e99;
        color: #ffffff;
        text-decoration: none;
        cursor: pointer;
        font-size: 14px;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    ul{
        align-items: center;
    }

    #logo_emco img{
        max-width: 100%;
        height: auto;
    }


    #btn_consultar{
        border-radius: 10px;
    }

    #btn_filtro{
        border-radius: 10px;
    }

    body{
        position: relative;
        isolation: isolate;
        min-height: 100vh;
        font-family: Arial, sans-serif;
        text-align: center;
        overflow-x: hidden;
        margin: 0%;
        padding: 0%;
    }

/* Marca de agua */
    body::before{
        content: "";
        position: fixed;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background-image: url('images/logo_emco_clean_gray.png');
        background-repeat: repeat;
        background-size: 250px;
        transform: rotate(-30deg);
        opacity: 0.30;
        pointer-events: none;
        z-index: 0;
    }

    body > *:not(header) {
        position: relative;
        z-index: 1;
    }
    
    main section{
        background-color: rgba(255,255,255,0.95);
        margin: 5% 15%;
        min-height: 1000px;
        padding: 60px;
        border-radius: 10px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    }

    .guide-action {
        margin-top: -8px;
    }

    .btn-guide,
    .btn-guide-close {
        min-height: 36px;
        padding: 7px 14px;
        border: 1px solid #365e99;
        border-radius: 3px;
        background-color: #365e99;
        color: #ffffff;
        cursor: pointer;
        font-size: 14px;
    }

    .btn-guide:hover,
    .btn-guide-close:hover {
        background-color: #294a78;
    }

    .document-guide {
        width: min(900px, calc(100% - 32px));
        max-height: 85vh;
        padding: 24px;
        border: 0;
        border-radius: 8px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
        overflow: auto;
    }

    .document-guide::backdrop {
        background-color: rgba(0, 0, 0, 0.55);
    }

    .document-guide-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 20px;
    }

    .document-guide-header h2 {
        margin: 0;
        padding: 0;
        font-size: 22px;
    }

    .document-guide-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .document-guide-options figure {
        min-width: 0;
        margin: 0;
    }

    .document-guide-options figcaption {
        margin-bottom: 10px;
        color: #365e99;
        font-size: 18px;
        font-weight: 700;
    }

    .document-guide-options img {
        display: block;
        width: 100%;
        max-height: 340px;
        object-fit: contain;
        background-color: #f5f5f5;
    }

    .document-guide-options p {
        margin: 10px 0 0;
        font-size: 15px;
    }

    #campo1,
    #campo2 {
    display: none;
    }
    
    
    form {
        width: 100%;
        padding-top: 50px;
        padding-bottom: 50px;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        gap: 20px;
    }

    form > div {
        flex: 1;
        min-width: 0;
    }

    .btn_search {
        height: 32px;
        padding: 4px 16px;
        border: 1px solid #777777;
        border-radius: 3px;
        font-size: 16px;
        cursor: pointer;
        white-space: nowrap;
    }

    form > div:last-child {
        flex: 0 0 auto;
        align-self: flex-end;
    }

    #form_consulta {
        width: min(100%, 1040px);
        margin: 0 auto;
        padding-top: 34px;
    }

    #form_consulta > div:first-child {
        flex: 1 1 230px;
        max-width: 300px;
    }

    #form_consulta > #campo1,
    #form_consulta > #campo2 {
        flex: 1 1 210px;
    }

    form select,
        form input {
            width: 100%;
            height: 32px;
            padding: 4px 8px;
            border: 1px solid #999999;
            border-radius: 3px;
            font-size: 16px;
        }

    form label {
        display: block;
        margin-bottom: 6px;
        font-size: 18px;
        text-align: center;
    }

    #form_consulta select,
    #form_consulta input:not([type="hidden"]),
    #form_consulta .btn_search {
        box-sizing: border-box;
        height: 42px;
    }

    #form_consulta label {
        min-height: 42px;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .footer-section-1{
        background-color: #365E99;
        margin-top: 50px;
        min-height: 110px; /* antes estaba mucho más alto */
        display: flex;
        justify-content: center;
        align-items:center;
    }

    .footer-div-footer{
        width: 100%;
        text-align: center;
        padding-bottom: 20px;
    }

    .footer-div-footer p{
        color: white;
        margin: 0;
        font-size: 14px;
    }




    @media (max-width: 1024px){

    main section{
        margin: 5%;
        padding: 40px;
    }

    .preview{
        height: 500px;
    }

    }



    @media (max-width: 768px){

        header{
            flex-direction: column;
            gap: 15px;
            padding: 20px;
        }

        form{
            display:flex;
            flex-direction: column;
            width:100%;
            align-items:center;
        }

        form div{
            width:100%;
            max-width:350px;
        }

        #form_consulta label {
            min-height: 0;
            display: block;
        }

        select,
        input,
        button{
            width:100%;
            box-sizing:border-box;
        }

        main section{
            margin:15px;
            padding:25px;
            min-height:auto;
        }

        .preview{
            width:100%;
            height:400px;
        }

        h2{
            font-size:22px;
        }

        .document-guide {
            padding: 18px;
        }

        .document-guide-header {
            align-items: flex-start;
        }

        .document-guide-options {
            grid-template-columns: 1fr;
            gap: 28px;
        }
    }

    .form_qr_hidden {
        display: none;
    }