.fondoF {
    display: none;
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.formulario {
    background-color: #ffffff;
    width: 30%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.549);
    padding: 20px;
}

.headerF {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: relative;
}

.headerF h2 {
    color: rgb(15, 129, 0);
    margin: 10px 0 0 0;
    font-size: 22px;
    font-weight: bold;
}

.seccionF {
    box-shadow: 0 0 10px rgba(0, 94, 17, 0.239);
    border-radius: 20px;
    padding: 8px;
    margin-bottom: 30px;
    background-color: #ffffff;
}

.tablaF {
    width: 100%;
    border-collapse: collapse;
}

.tablaF td {
    padding: 14px 20px;
    font-size: 14px;
    width: 33.33%;
}

.tablaF tr:nth-child(odd) {
    background-color: #e3ffeb;
}

.tablaF input[type="text"],
.tablaF input[type="number"],
.tablaF input[type="password"],
.tablaF input[type="email"],
.tablaF input[type="tel"],
.tablaF select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #aaa;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #ffffff;
}

.ver {
    width: 15px;
}

.tablaF input:focus,
.tablaF select:focus {
    outline: none;
    border-color: #00a13e;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.botonGuardar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #d1ffde;
    color: rgb(0, 0, 0);
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin: 0 auto;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.botonGuardar:hover {
    box-shadow: 0 0 10px rgba(0, 255, 21, 0.897);
    transform: scale(1.1);
}

.botonCancelar {
    position: absolute;
    background-color: transparent;
    width: 15px;
    right: 0;
    top: 0;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.botonCancelar:hover {
    transform: scale(1.2);
}

.mensaje {
    display: none;
    font-size: 12px;
    color: rgb(255, 0, 0);
    padding: 0;
    margin-top: 5px;
    margin-bottom: 0;
}

@keyframes aparecer {
    from {
        transform: translatey(10%);
        opacity: 0;
    }
    to {
        transform: translatey(0);
        opacity: 1;
    }
}

.fondoF {
    animation: aparecer 0.5s ease-out;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

@media (max-width: 1200px) {
    .formulario {
        width: 40%;
    }
}

@media (max-width: 992px) {
    .formulario {
        width: 50%;
    }

    .tablaF td {
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .fondoF {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        align-items: flex-start;
        padding-top: 80px;
    }

    .formulario {
        width: 80%;
        max-height: 80vh;
        padding: 25px 20px 25px 20px;
        margin: 0 auto;
    }

    .headerF {
        margin-bottom: 20px;
        padding-bottom: 10px;
        margin-top: 5px;
    }

    .headerF h2 {
        font-size: 20px;
        margin: 5px 0 10px 0;
    }

    .botonCancelar {
        width: 18px;
        right: 5px;
        top: 5px;
        padding: 8px;
    }

    .seccionF {
        padding: 15px;
        margin-bottom: 25px;
    }

    .tablaF {
        width: 100%;
    }

    .tablaF td {
        padding: 12px 10px;
        font-size: 14px;
    }

    .tablaF input[type="text"],
    .tablaF input[type="number"],
    .tablaF input[type="password"],
    .tablaF input[type="email"],
    .tablaF input[type="tel"],
    .tablaF select {
        padding: 8px 10px;
        font-size: 14px;
    }

    .tablaF td div[style*="display: flex"] {
        flex-direction: row;
        gap: 8px;
    }

    .btn-generar-contraseña {
        width: auto;
        margin-top: 0;
        height: 38px;
        font-size: 13px;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .botonGuardar {
        width: auto;
        min-width: 200px;
        padding: 10px 25px;
        font-size: 16px;
        margin: 20px auto 10px auto;
    }
}

@media (max-width: 576px) {
    .fondoF {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        align-items: flex-start;
        padding-top: 70px;
    }

    .formulario {
        width: 92%;
        max-height: 80vh;
        padding: 25px 15px 25px 15px;
        margin: 0 auto;
    }

    .headerF {
        margin-bottom: 20px;
        padding-bottom: 5px;
        margin-top: 5px;
    }

    .headerF h2 {
        font-size: 18px;
        margin: 5px 0 10px 0;
        padding: 0 30px;
    }

    .botonCancelar {
        width: 15px;
        right: 5px;
        top: 5px;
        padding: 8px;
    }

    .seccionF {
        padding: 12px;
        margin-bottom: 20px;
    }

    .tablaF,
    .tablaF tbody,
    .tablaF tr,
    .tablaF td {
        display: block;
    }

    .tablaF tr {
        margin-bottom: 16px;
        background: none !important;
    }

    .tablaF tr:first-child {
        display: none;
    }

    .tablaF td {
        width: 100% !important;
        padding: 6px 0;
        position: relative;
        margin-bottom: 0;
    }

    .tablaF td:before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        color: rgb(15, 129, 0);
        font-size: 13px;
        margin-bottom: 4px;
        letter-spacing: -0.2px;
    }

    .tablaF input[type="text"],
    .tablaF input[type="number"],
    .tablaF input[type="password"],
    .tablaF input[type="email"],
    .tablaF input[type="tel"],
    .tablaF select {
        padding: 8px 10px;
        font-size: 14px;
        border: 1px solid #ccc;
        margin-bottom: 0;
    }

    .mensaje {
        font-size: 11px;
        margin-top: 4px;
        margin-bottom: 0;
        line-height: 1.3;
    }

    .tablaF tr:last-child td {
        padding-top: 6px;
        border-top: none;
    }

    .tablaF td div[style*="display: flex"] {
        flex-direction: column;
        gap: 8px;
    }

    .tablaF td div[style*="position: relative"] {
        width: 100%;
    }

    .ver {
        width: 14px !important;
        height: auto;
    }

    .btn-generar-contraseña {
        width: 100%;
        margin-top: 4px;
        height: 36px;
        font-size: 13px;
        padding: 6px;
    }

    .botonGuardar {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        margin: 20px auto 10px auto;
    }

    .boton-container {
        margin-top: 15px;
        margin-bottom: 5px;
        padding: 0 5px;
    }
}

@media (max-width: 375px) {
    .fondoF {
        padding-top: 60px;
    }

    .formulario {
        width: 94%;
        padding: 20px 12px 20px 12px;
    }

    .headerF {
        margin-bottom: 15px;
        margin-top: 3px;
    }

    .headerF h2 {
        font-size: 16px;
        padding: 0 25px;
        margin: 3px 0 8px 0;
    }

    .botonCancelar {
        top: 3px;
        right: 3px;
        padding: 6px;
    }

    .seccionF {
        padding: 10px;
        margin-bottom: 16px;
    }

    .tablaF tr {
        margin-bottom: 14px;
    }

    .tablaF td {
        padding: 5px 0;
    }

    .tablaF td:before {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .tablaF input[type="text"],
    .tablaF input[type="number"],
    .tablaF input[type="password"],
    .tablaF input[type="email"],
    .tablaF input[type="tel"],
    .tablaF select {
        padding: 7px 8px;
        font-size: 13px;
    }

    .ver {
        width: 13px !important;
    }

    .btn-generar-contraseña {
        height: 34px;
        font-size: 12px;
        padding: 5px;
        margin-top: 3px;
    }

    .botonGuardar {
        padding: 10px;
        font-size: 14px;
        margin: 15px auto 8px auto;
    }

    .mensaje {
        font-size: 10px;
        margin-top: 3px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .fondoF {
        padding-top: 60px;
        align-items: flex-start;
    }

    .formulario {
        width: 80%;
        max-height: 85vh;
        padding: 20px 15px 20px 15px;
    }

    .headerF {
        margin-bottom: 15px;
        margin-top: 0;
    }

    .tablaF td {
        padding: 8px 10px;
    }

    .tablaF,
    .tablaF tbody,
    .tablaF tr,
    .tablaF td {
        display: table-cell;
    }

    .tablaF tr {
        display: table-row;
    }

    .tablaF td {
        display: table-cell;
        width: 33.33%;
    }

    .tablaF tr:first-child {
        display: table-row;
    }

    .tablaF td:before {
        display: none;
    }

    .tablaF td div[style*="display: flex"] {
        flex-direction: row;
        gap: 10px;
    }

    .btn-generar-contraseña {
        width: auto;
        margin-top: 0;
        height: 34px;
    }

    .botonGuardar {
        margin: 15px auto 10px auto;
    }
}