:root {
    --primary-color: #6B5BBA;
    --primary-hover: #7C6AD6;
    --text-color: #FFFFFF;
    --input-bg: rgba(30, 30, 35, 0.5);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --border-radius: 0.75rem;
    --blur: blur(8px);
}

.function-login {
    min-height: 100vh;
    min-width: 320px;
    overflow-x: hidden;
    word-break: break-word;
    display: grid;
    place-items: center;
    font-family: 'Inter', sans-serif;
}

.function-login::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(235, 235, 235, 0.1), rgba(235, 235, 235, 0.2)), url("/images/background.jpg") center/cover no-repeat;
}

.function-login .panel-heading {
    display: none;
}

.function-login .bs-pagepanel {
    background: none;
}

.function-login .r-panel-form {
    width: min(100%, 50rem);
    padding: 2rem;
    background: var(--input-bg);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.function-login .r-panel-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.function-login h2 {
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.function-login h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.function-login form {
    width: 100%;
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.function-login .form-group {
    position: relative;
    width: 100%;
}

.function-login input[type="text"],
.function-login input[type="password"] {
    width: 100%;
    height: 3.5rem;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius);
    transition: box-shadow 0.2s ease;
}

.function-login input[type="text"]::placeholder,
.function-login input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.function-login input[type="text"]:focus,
.function-login input[type="password"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.function-login .form-group::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    background-size: contain;
    background-repeat: no-repeat;
}

.function-login input[type="text"] + .form-group::before {
    content: 'Usuário';
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    left: 1rem;
    transform: translateY(-50%);
}

.function-login input[type="password"] + .form-group::before {
    content: 'Senha';
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    left: 1rem;
    transform: translateY(-50%);
}

.function-login .checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.function-login .checkbox label {
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.function-login .checkbox label::before {
    content: '';
    width: 1.5rem;
    height: 1.5rem;
    background: var(--input-bg);
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    transition: all 0.2s ease;
}

.function-login .checkbox label.checked::before {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.761)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 1rem;
    background-position: center;
}

.function-login .checkbox label:hover::before {
    border-color: var(--primary-color);
}

.function-login input[type="checkbox"] {
    display: none;
}

.function-login [data-itemtype="login_remind"] a,
.function-login [data-itemtype="loginform_register_link"] a {
    color: var(--text-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.function-login [data-itemtype="login_remind"] a:hover,
.function-login [data-itemtype="loginform_register_link"] a:hover {
    color: var(--primary-hover);
}

.function-login .btn.btn-primary {
    width: 100%;
    height: 3.5rem;
    background: var(--primary-color);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.function-login .btn.btn-primary:hover {
    background: var(--primary-hover);
}

.function-login .btn.btn-primary .fa {
    font-size: 1.2rem;
}

.function-login [data-itemtype="login_google"] {
    margin-top: 1.5rem;
}

.function-login [data-itemtype="login_message"] {
    background: none;
    border: none;
}

@media (max-width: 768px) {
    .function-login .r-panel-form {
        padding: 1.5rem;
    }

    .function-login form {
        max-width: calc(100% - 2rem);
    }

    .function-login h2 {
        font-size: 2rem;
    }

    .function-login h3 {
        font-size: 1.1rem;
    }
}