body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to top, rgba(250, 59, 153, 0.3), #FFF9F0);
}

.container{
    position: relative;
    width: 950px;
    height: 650px;
    background: var(--light-bg);
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    margin: 20px;
    overflow: hidden;
}

/* Form Box (Login or Assistance) */
.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px; 
    z-index: 1;
    transition: .6s ease-in-out 1.2s, 0s 1s;
}

.container.active .form-box{
    right: 50%;
}

.form-box.assistance{
    visibility: hidden;
}

.container.active .form-box.assistance{
    visibility: visible;
}

/* Login Form Styles */
.form-box.login form {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    text-align: left;
    color: #333;
}

.forgot-link{
    margin: -10px 0 15px;
    text-align: right ;
}

.forgot-link a{
    font-size: 14.5px;
    color: var(--primary-color);
    text-decoration: underline;
}

form{
    width: 100%;
}

.container .title{
    font-size: 36px;
    margin: -10px 0;
    color: var(--accent-color);
}

/* input box */
.input-box {
    position: relative;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
}

.input-box label {
    font-size: 16px; 
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
    text-align: left; 
}

.input-box-input-with-icon { 
    display: flex;
    align-items: center; 
}

.input-box input {
    flex-grow: 1;
    width: 100%;
    min-width: 200px;        /* ensures it doesn’t shrink too much */
    max-width: 100%;         /* prevents overflow outside container */
    padding: 15px 15px;      /* unified padding */
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 12.5px;
    color: #333;
    font-weight: 500;
    background-color: rgba(20, 174, 187, 0.1); 
    overflow: hidden;        /* hides overflowed text */
    text-overflow: ellipsis; /* shows "..." for long emails */
    white-space: nowrap;     /* prevents wrapping */
}


.input-box input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 174, 187, 0.1) inset !important;
    -webkit-text-fill-color: #333 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-box i{
    position: absolute;
    right: 15px;
    margin-left: 10px; 
    font-size: 20px;
    color: #888;
    cursor: pointer;
    z-index: 2; 
}

/*Error Message Styles*/

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.toast {
    min-width: 200px;
    max-width: 300px;
    background-color: #d93025; /* error red */
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.9em;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #34a853;
}
.toast.info {
    background-color: #4285f4;
}





/* Assistance Form Styles */
.form-box.assistance .contact-info {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    text-align: left;
    color: #333;
}

.form-box.assistance .contact-info p {
    font-size: 16px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.form-box.assistance .contact-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.form-box.assistance .contact-info ul li {
    font-size: 15px;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.form-box.assistance .contact-info ul li::before {
    content: '📧';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    color: var(--primary-color);
}

.form-box.assistance .contact-info ul li:nth-child(2)::before {
    content: '📞';
}

.form-box.assistance .contact-info a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s;
}

.form-box.assistance .contact-info a:hover {
    color: var(--accent-color);
}

/* Button Styles */
.btn{
    width: 100%;
    height: 48px;
    background: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #FFF;
    font-weight: 600;
}

.btn:hover{
    background: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}

.container p{
    font-size: 14.5px;
    margin: 15px 0;
}

/* Toggle Box Styles */
.toggle-box{
    position: absolute;
    width: 100%;
    height: 100%;
    color: #FFF;
}

.toggle-box::before{
    content: "";
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 150px;
    z-index: 2;
    transition: 1.8s ease-in-out;
}

.container.active .toggle-box::before{
    left: 50%;
}

.toggle-panel{
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
}

.toggle-panel.toggle-left{
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left{
    left: -50%;
    transition-delay: .6s;
}

.toggle-panel.toggle-right{
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right{
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel p{
    margin-bottom: 20px;
}

.toggle-panel .btn{
    width: 160px;
    height: 46px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

.toggle-panel .btn:hover {
    background: var(--accent-color);
}

.login-back-btn {
    position: absolute;
    top: 20px; 
    left: 20px; 
    cursor: pointer;
    z-index: 10;
    background: transparent;
}
.login-back-btn i {
    font-size: 24px; 
    color: var(--light-bg); 
}

@media screen and (max-width: 650px) {
    .container {
        height: calc(100vh - 40px);
    }
    
    .form-box{
        width: 100%;
        height: 70%;
        bottom: 0;
    }

    .container.active .form-box{
        right: 0;
        bottom: 30%;
    }

    .toggle-box::before{
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vh;
    }

    .container.active .toggle-box::before{
        top: 70%;
        left: 0;
    }

    .toggle-panel{
        width:  100%;
        height: 30%;
    }

    .toggle-panel.toggle-left{
        top: 0;
    }

    .container.active .toggle-panel.toggle-left{
        left: 0;
        top: -30%;
    }

    .toggle-panel.toggle-right{
        right: 0;
        bottom: -30%;
    }

    .container.active .toggle-panel.toggle-right{
        bottom: 0;
    }

    .input-box input{
        width: 200px;
    }

}

@media screen and (max-width: 400px) {
    .form-box{
        padding: 20px;
    }

    .toggle-panel h1{
        font-size: 30px;
    }
}


