*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background:
        linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, .22)),
        var(--login-bg-image) center/cover no-repeat;
    min-height: 100vh;
    font-family: "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container-box{
    position: relative;
    width: 900px;
    max-width: 100%;
    min-height: 600px;
    background: rgba(255,255,255,.94);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,.08);
    backdrop-filter: blur(4px);
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all .6s ease-in-out;
}

/* LOGIN */
.sign-in{
    left: 0;
    width: 50%;
    z-index: 2;
}

/* CADASTRO */
.sign-up{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

/* ACTIVE */
.container-box.active .sign-in{
    transform: translateX(100%);
}

.container-box.active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

form{
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
}

.logo-circle{
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #198754, #146c43);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(25,135,84,.25);
    overflow: hidden;
}

.logo-circle i{
    font-size: 34px;
    color: white;
}

.logo-circle .login-logo{
    width: 60px;
    max-width: 75%;
    height: auto;
    max-height: 75%;
    object-fit: contain;
    display: block;
}

.login-logo{
    width: 120px;
    max-width: 45%;
    height: auto;
    max-height: 130px;
    object-fit: contain;
    display: block;
    margin-bottom: 18px;
}

h1{
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle{
    color: #777;
    margin-bottom: 25px;
    font-size: 14px;
}

.input-group{
    margin-bottom: 15px;
}

.input-group-text{
    background: #f8f9fa;
    border-radius: 14px 0 0 14px;
    color: #198754;
    width: 52px;
    justify-content: center;
}

.form-control{
    height: 50px;
    border-radius: 0 14px 14px 0;
    border-left: none;
}

.form-control:focus{
    border-color: #198754;
    box-shadow: 0 0 0 .15rem rgba(25,135,84,.12);
}

.btn-custom{
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #198754, #146c43);
    color: white;
    font-weight: 600;
    transition: .3s;
    margin-top: 10px;
}

.btn-custom:hover{
    transform: translateY(-2px);
}

/* OVERLAY */

.overlay-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform .6s ease-in-out;
    z-index: 100;
}

.container-box.active .overlay-container{
    transform: translateX(-100%);
}

.overlay{
    background: linear-gradient(135deg, #198754, #146c43);
    color: white;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform .6s ease-in-out;
}

.container-box.active .overlay{
    transform: translateX(50%);
}

.overlay-panel{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
}

.overlay-left{
    transform: translateX(-20%);
}

.container-box.active .overlay-left{
    transform: translateX(0);
}

.overlay-right{
    right: 0;
    transform: translateX(0);
}

.container-box.active .overlay-right{
    transform: translateX(20%);
}

.ghost{
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 14px;
    padding: 12px 35px;
    margin-top: 20px;
    font-weight: 600;
    transition: .3s;
}

.ghost:hover{
    background: rgba(255,255,255,.1);
}

/* MOBILE */

@media(max-width: 768px){

    body{
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 40px 15px;
    }

    .container-box{
        width: 100%;
        min-height: auto;
        border-radius: 20px;
    }

    /* ESCONDE OVERLAY */
    .overlay-container{
        display: none;
    }

    /* FORMULÁRIOS */
    .form-container{
        position: relative;
        width: 100%;
        height: auto;
        top: unset;
        left: unset;
        transform: none !important;
        opacity: 1 !important;
        transition: none;
    }

    .sign-in,
    .sign-up{
        width: 100%;
    }

    /* CONTROLE MOBILE */
    .sign-up{
        display: none;
    }

    .container-box.active .sign-up{
        display: block;
    }

    .container-box.active .sign-in{
        display: none;
    }

    .container-box:not(.active) .sign-in{
        display: block;
    }

    form{
        padding: 40px 25px;
    }

    h1{
        font-size: 28px;
    }

    .logo-circle{
        width: 70px;
        height: 70px;
    }

    .logo-circle i{
        font-size: 28px;
    }

    .mobile-switch{
        margin-top: 20px;
        text-align: center;
        font-size: 14px;
    }

    .mobile-switch button{
        border: none;
        background: none;
        color: #198754;
        font-weight: 600;
        padding: 0;
    }

}
