:root {
    --brand-900: #0f172a;
    --brand-600: #2563eb;
    --primary-color: #2563eb;
    --primary-darker: #1d4ed8;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
    --success-bg: #d4edda; /* Para futuras mensagens de sucesso */
    --success-text: #155724;
    --success-border: #c3e6cb;
    --input-bg: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background: var(--brand-900);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('/images/banner.webp') center/cover no-repeat;
}

.page-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 58, 95, 0.85) 45%, rgba(37, 99, 235, 0.35) 100%);
}

.login-page {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    background-color: var(--white);
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 450px;
    width: 100%;
    text-align: center; /* Centraliza logo e outros elementos */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Opcional: Efeito sutil ao passar o mouse sobre o container */
.login-container:hover {
    /* transform: translateY(-5px); */ /* Leve elevação */
    /* box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); */
}


.login-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-decoration: none;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.login-back {
    margin: 1.25rem 0 0;
    font-size: 0.875rem;
    text-align: center;
}

.login-back a {
    color: var(--brand-600);
    text-decoration: none;
}

.login-back a:hover {
    text-decoration: underline;
}

.login-brand__icon {
    height: 2.5rem;
    width: auto;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.login-brand__name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-900);
    letter-spacing: -0.02em;
    line-height: 1.1;
    white-space: nowrap;
}

.login-brand__name span {
    color: var(--brand-600);
    font-weight: 700;
}

/* Mensagens de Alerta */
.alert {
    display: flex; /* Para alinhar ícone e texto */
    align-items: center;
    justify-content: center; /* Centraliza conteúdo */
    padding: 12px 15px;
    margin-bottom: 25px;
    border-radius: 6px;
    font-size: 0.9em;
    border: 1px solid transparent;
    text-align: left; /* Alinha texto à esquerda dentro da div */
}

.alert i {
    margin-right: 10px; /* Espaço entre ícone e texto */
    font-size: 1.1em;
}

.alert-error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

/* Grupos de Formulário */
.form-group {
    margin-bottom: 25px;
    text-align: left; /* Alinha labels e inputs à esquerda */
}

/* Grupo de Input com Ícone */
.input-group {
    position: relative; /* Necessário para posicionar o ícone */
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none; /* Para não interferir no clique do input */
    font-size: 0.95em;
}

/* Campos de Input */
.input-group input[type="email"],
.input-group--password input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    background-color: var(--input-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input::placeholder { /* Estilo do placeholder */
    color: var(--text-light);
    opacity: 0.8;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15); /* Sombra de foco suave */
    background-color: var(--white);
}

/* Move o ícone quando o input está focado */
.input-group input:focus + .input-icon i, /* Não funciona diretamente, vamos focar o ícone via JS se necessário ou apenas mudar a cor do ícone */
.input-group:focus-within .input-icon {
    color: var(--primary-color);
}

.input-group--password input {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Estilo do reCAPTCHA */
.recaptcha-group {
    display: flex;
    justify-content: center; /* Centraliza o widget */
    margin-bottom: 30px; /* Mais espaço antes do botão */
}
.g-recaptcha > div { /* Tenta garantir que o reCAPTCHA não estoure */
    margin: 0 auto;
}


/* Botão de Submissão */
button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-darker) 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600; /* Fonte mais forte */
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: flex; /* Para alinhar ícone e texto */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espaço entre ícone e texto */
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3); /* Sombra sutil do botão */
}

button[type="submit"] i {
    font-size: 1em; /* Tamanho do ícone no botão */
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-color) 100%);
    transform: translateY(-2px); /* Leve elevação no hover */
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

button[type="submit"]:disabled {
    background: #ccc; /* Cor padrão para desabilitado */
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Estilos para Links Opcionais */
.form-links {
    margin-top: 25px;
    font-size: 0.9em;
    text-align: center;
}

.form-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: var(--primary-darker);
    text-decoration: underline;
}

.form-links span { /* Separador */
    color: var(--text-light);
    margin: 0 10px;
}


/* Responsividade */
@media (max-width: 500px) {
    .login-container {
        padding: 30px 25px; /* Reduz padding em telas menores */
        margin: 0 10px;
    }

    .login-brand__name {
        font-size: 1.05rem;
    }

    .login-brand__icon {
        height: 2.25rem;
    }

    button[type="submit"] {
        font-size: 1em;
        padding: 12px 15px;
    }

    .input-group input[type="email"],
    .input-group--password input {
        padding: 12px 15px 12px 40px;
        font-size: 0.95em;
    }

    .input-icon {
        left: 12px;
        font-size: 0.9em;
    }
}