@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Nunito';
}

body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 90%;
    max-width: 1000px;
    height: 600px;
    min-height: 500px;
}

.login-left-panel {
    flex: 1;
    background-color: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.left-panel-content {
    max-width: 300px;
}

.ubuild-logo-white {
    width: 80px;
    margin-bottom: 20px;
}

.login-left-panel h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
}

.login-left-panel p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.login-right-panel {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}

.register-top-link {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 15px;
    color: #555;
}

.register-top-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.register-top-link a:hover {
    text-decoration: underline;
}

.login-right-panel h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    font-weight: 700;
    text-align: left;
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    top: 15px;
    left: 15px;
    color: #888;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background-color: #fff;
    padding: 0 5px;
    transform-origin: left top;
    z-index: 1;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 15px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="email"]:focus + label,
input[type="email"]:not(:placeholder-shown) + label,
input[type="password"]:focus + label,
input[type="password"]:not(:placeholder-shown) + label,
input[type="text"]:focus + label,
input[type="text"]:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #007bff;
    font-weight: 600;
    z-index: 2;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
    background-color: #fff;
}

.error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
    text-align: left;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #888;
    font-size: 18px;
    transition: color 0.2s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: #333;
}

.label-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-link label {
    position: static;
    transform: none;
    padding: 0;
    background-color: transparent;
    font-weight: 600;
    color: #555;
    font-size: 15px;
    margin-bottom: 0;
}

.label-with-link .forgot-password-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.label-with-link .forgot-password-link:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -10px;
    margin-bottom: 30px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: #000;
    border-color: #000;
}

.checkbox-group input[type="checkbox"]::before {
    content: '\2713';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked::before {
    opacity: 1;
}

.checkbox-group label {
    position: static;
    transform: none;
    padding: 0;
    background-color: transparent;
    font-weight: 400;
    color: #555;
    font-size: 15px;
    margin-bottom: 0;
    cursor: pointer;
}


.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cancel-btn {
    width: 100%;
    padding: 14px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.cancel-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Responsividade */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .login-left-panel {
        padding: 30px;
    }

    .login-left-panel h2 {
        font-size: 28px;
    }

    .login-right-panel {
        padding: 30px;
    }

    .register-top-link {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }

    .login-right-panel h2 {
        text-align: center;
    }
}

@media (max-width: 550px) {
    .login-container {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    body {
        padding: 0;
    }

    .login-left-panel,
    .login-right-panel {
        padding: 20px;
    }

    .login-left-panel h2 {
        font-size: 24px;
    }

    .login-left-panel p {
        font-size: 14px;
    }

    .login-right-panel h2 {
        font-size: 24px;
    }

    .social-btn, .submit-btn, .cancel-btn {
        padding: 12px;
        font-size: 16px;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 12px 15px;
        font-size: 15px;
    }

    .form-group label {
        font-size: 14px;
    }

    input[type="email"]:focus + label,
    input[type="email"]:not(:placeholder-shown) + label,
    input[type="password"]:focus + label,
    input[type="password"]:not(:placeholder-shown) + label,
    input[type="text"]:focus + label,
    input[type="text"]:not(:placeholder-shown) + label {
        font-size: 11px;
    }
}