/*---------------------------------------------------FUENTE MONTSERRAT---------------------------------------------------*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

/*---------------------------------------------------HEADER---------------------------------------------------*/
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: white;
    border-bottom: #09090b1a 1px solid;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 110px;
    height: 70px;
    object-fit: contain;
}

.back-home {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background-color: #f9fafb;
    color: #183b6e;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.back-home:hover {
    background-color: #7ca841;
    color: white;
    border-color: #7ca841;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.back-home .icon-home {
    width: 20px;
    height: 20px;
}

/*---------------------------------------------------CUERPO---------------------------------------------------*/
body {
    font-family: "Montserrat", sans-serif;
    background-color: #fafafa;
}

.rol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/*---------------------------------------------------IMG FIANZAS---------------------------------------------------*/
.imagen {
    width: 400px;
    display: block;
    margin: 0 auto;
    margin-top: 100px;
    margin-bottom: 60px;
}

/*---------------------------------------------------FORMULARIO---------------------------------------------------*/
.formulario {
    background-color: #ffffff;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 40px;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.formulario::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 40px;
    background: linear-gradient(to bottom, #7ca841, #ffffff 100%);
    z-index: -1;
}

.icon {
    width: 30px;
    height: 30px;
    color: #183b6e;
}

h1 {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    padding-top: 30px;
    font-size: 30px;
    color: #183b6e;
}

p {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    color: #183b6e;
}

a {
    font-family: "Montserrat", sans-serif;
    font-weight: bold;
    text-align: right;
    font-size: 16px;
    color: #7ca841;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 17px;
    color: #183b6e;
}

input {
    font-family: "Montserrat", sans-serif;
    width: calc(100% - 30px);
    padding: 10px;
    margin: 0 auto 20px auto;
    border: 2px solid #7ca841;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    display: block;
    text-align: left;
}

input:focus {
    box-shadow: 0 0 7px #7ca841;
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    outline: none;
}

button,
input[type="submit"] {
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #7ca841;
    background-color: #7ca841;
    color: #ffffff;
    cursor: pointer;
    width: 100%;
    max-width: 605px;
    padding: 10px;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    display: block;
    text-align: center;
}

button:hover,
input[type="submit"]:hover {
    background: linear-gradient(to top, #9acf55, #9acf55);
    color: #ffffff;
    transition:
        background 0.9s ease,
        color 0.9s ease,
        border-color 0.9s ease;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #a3c17d;
    border-color: #a3c17d;
}

.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.version {
    position: fixed;
    bottom: 22px;
    right: 20px;
    font-size: 12px;
    color: #22335a;
    opacity: 0.7;
}

/*---------------------------------------------------RESPONSIVE---------------------------------------------------*/
@media (max-width: 768px) {
    .imagen {
        width: 80%;
        margin-top: 90px;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 24px;
    }

    label {
        font-size: 14px;
    }

    input,
    button {
        padding: 12px;
    }
}

/*---------------------------------------------------PASSWORD TOGGLE---------------------------------------------------*/
.password-wrapper {
    position: relative;
    margin: 0 auto 20px auto;
}

.password-wrapper input {
    width: 100%;
    margin: 0;
    padding-right: 40px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #183b6e;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    max-width: none;
    margin: 0;
    border-radius: 0;
    background-color: transparent;
}

.password-toggle:hover {
    background: none;
    color: #3460a3;
}

.password-toggle:focus {
    outline: none;
}
