* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    background: #f5f7fb;
}

.login-box {
    background: #fff;
    width: 60%;
    margin: 30px auto;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.wolcome-login {
    background: linear-gradient(rgba(18, 141, 207, 0.712), rgba(18, 201, 207, 0.705)), url("../assets/image/youssef.png");
    background-size: cover;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;

}

.wolcome-login h2 , .wolcome-login p {
    color: white;

}

#loginForm {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    text-align: right;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.form-subtitle {
    font-size: 13px;
    line-height: 1.7;
    opacity: 0.9;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
    color: #444;
}

.input-group input {
    width: 100%;
    padding: 7px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    outline: none;
    font-size: 14px;
    transition: 0.3s;
    background: #fafafa;
}

.input-group input:focus {
    border-color: #128CCF;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(18,140,207,0.1);
}

.password-group {
    position: relative;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-left: 38px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 14px;
    transition: 0.3s;
}

.toggle-password:hover {
    color: #128CCF;
}

.forgot-link {
    text-align: left;
    margin-top: -10px;
    margin-bottom: 20px;
}

.forgot-link a {
    font-size: 12px;
    color: #128CCF;
    text-decoration: none;
}

.forgot-link a:hover {
    text-decoration: underline;
}

.btns-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn {
    width: 100%;
    padding: 7px 20px;
    border: none;
    border-radius: 28px;
    background: #128CCF;              
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.5s;
}

.submit-btn:hover {
    background: #0f76b3;
    box-shadow: 0 5px 15px rgba(18,140,207,0.3);
}

.google-btn {
    width: 100%;
    padding: 7px 20px;
    color: #e72c2c;
    border: 1px solid #e72c2c;
    background: white;
    border-radius: 28px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.5s;
}

.google-btn:hover {
    background-color: #e72c2c;
    color: white;
    box-shadow: 0 10px 20px rgba(207, 56, 18, 0.3);
}

.login-link {
    text-align: center;
    margin-top: 15px;
}

.login-link a {
    font-size: 13px;
    color: #128CCF;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #bbb;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

@media (max-width: 1024px) {
    .login-box {
        width: 90%;
        grid-template-columns: 1fr 1.5fr;
    }

    #loginForm {
        padding: 35px 25px;
    }
}

@media (max-width: 768px) {
    body {
        height: 100vh;
    }

    .nav-bar {
        padding: 25px 15px;
        overflow :visible;

    }
    .login-box {
        width: 95%;
        grid-template-columns: 1fr;
        margin: 20px auto;
    }

    #loginForm {
        padding: 30px 20px;
    }

    .btns-form {
        flex-direction: column;
        gap: 10px;
    }

    .submit-btn,
    .google-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 95%;
        margin: 15px auto;
        border-radius: 10px;
    }
    .form-title {
        font-size: 18px;
        
    }
    .form-subtitle {
        font-size: 13px;  
    }
    .input-group label {
        font-size: 12px;
    }

    .input-group input {
        font-size: 13px;
        padding: 10px;
    }

    .submit-btn,
    .google-btn {
        font-size: 13px;
        padding: 10px;
    }

    .login-link a {
        font-size: 12px;
    }
}



body.dark-mode {
    background: #151516;
    color: #e0e0e0;
}

body.dark-mode .login-box {
    background: #16213e;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}


body.dark-mode .input-group label {
    color: #bbb;
}

body.dark-mode .input-group input {
    background: #0f3460;
    border-color: #1a4a8a;
    color: #e0e0e0;
}

body.dark-mode .input-group input:focus {
    border-color: #84ccf3;
    box-shadow: 0 0 0 4px rgba(18,140,207,0.2);
}

body.dark-mode .google-btn {
    background: #16213e;
    border-color: #e72c2c;
    color: #e72c2c;
}

body.dark-mode .google-btn:hover {
    background: #e72c2c;
    color: #ddd;
}
