/* Reset de margens e padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4527A0;
    --primary-light: #6C4DED;
    --primary-dark: #2E1A6E;
    --accent-color: #6C4DED;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --border-radius: 8px;
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f2f2f2;
    background-image: 
        radial-gradient(circle at 90% 10%, rgba(108, 77, 237, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 10% 90%, rgba(108, 77, 237, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(69, 39, 160, 0.3) 0%, transparent 100%);
    position: relative;
    overflow: hidden;
}

/* Adicionando elementos decorativos de fundo */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 150vw;
    height: 150vh;
    top: -25vh;
    left: -25vw;
    z-index: -1;
    opacity: 0.05;
    animation: rotate 120s linear infinite;
}

body::before {
    background-image: 
        repeating-linear-gradient(
            0deg,
            var(--primary-color),
            var(--primary-color) 20px,
            transparent 20px,
            transparent 40px
        );
    animation-direction: normal;
}

body::after {
    background-image: 
        repeating-linear-gradient(
            90deg,
            var(--primary-color),
            var(--primary-color) 20px,
            transparent 20px,
            transparent 40px
        );
    animation-delay: -30s;
    animation-direction: reverse;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Aqui começam os elementos flutuantes no background */
.bg-element {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    animation: float 15s ease-in-out infinite;
    background-image: linear-gradient(45deg, currentColor, transparent 70%);
}

.shape-1 {
    width: 80px;
    height: 80px;
    color: rgba(108, 77, 237, 0.1);
    top: 15%;
    left: 20%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    color: rgba(69, 39, 160, 0.1);
    top: 60%;
    left: 80%;
    border-radius: 64% 36% 27% 73% / 55% 58% 42% 45%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    color: rgba(108, 77, 237, 0.1);
    top: 80%;
    left: 10%;
    border-radius: 41% 59% 37% 63% / 57% 59% 41% 43%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    color: rgba(108, 77, 237, 0.1);
    top: 25%;
    right: 15%;
    border-radius: 42% 58% 65% 35% / 30% 42% 58% 70%;
    animation-delay: -3s;
}

.shape-5 {
    width: 50px;
    height: 50px;
    color: rgba(46, 26, 110, 0.1);
    bottom: 15%;
    right: 30%;
    border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

.login-card {
    display: flex;
    overflow: hidden;
    height: 560px;
    max-width: 900px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out forwards;
    transform-style: preserve-3d;
    transform: perspective(1500px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Login Left (Formulário) */
.login-left {
    flex: 1;
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    background-color: white;
    justify-content: space-between;
}

/* Login Right (Área colorida) */
.login-right {
    flex: 1;
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Elementos decorativos no fundo roxo */
.login-right:before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.login-right:after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

/* Alinhamento do título e logo */
.login-header {
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    margin-top: 0;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
    padding-top: 10px;
}

.login-logo {
    height: 60px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10px;
}

.login-logo img {
    max-width: 180px;
    filter: brightness(0) invert(1);
}

/* Social Login */
.social-login {
    margin: 10px 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #555;
    font-size: 14px;
}

.social-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.social-btn:disabled::after {
    content: '';
    position: absolute;
    top: 19px;
    left: 10px;
    width: 20px;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.3);
    transform: rotate(45deg);
}

.social-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover:not(:disabled) {
    border-color: #DB4437;
    color: #DB4437;
}

.social-btn.facebook:hover:not(:disabled) {
    border-color: #4267B2;
    color: #4267B2;
}

.social-btn.linkedin:hover:not(:disabled) {
    border-color: #0077B5;
    color: #0077B5;
}

/* Divider */
.divider {
    margin: 10px 0 15px;
    height: 30px;
    display: flex;
    align-items: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.divider span {
    padding: 0 10px;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: all 0.3s;
    background-color: #f9f9f9;
    height: 45px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(108, 77, 237, 0.1);
    background-color: white;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Form Footer */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 15px;
    font-size: 14px;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    position: relative;
    width: 16px;
    height: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s;
    background-color: #f9f9f9;
}

.remember-me input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.remember-me input[type="checkbox"]:checked:after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    left: 3px;
    top: -1px;
}

.remember-me label {
    color: #666;
    cursor: pointer;
}

/* Forgot Password */
.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.forgot-password:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Error Message */
.error-message {
    color: var(--error-color);
    margin-bottom: 20px;
    font-size: 14px;
    min-height: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.error-message:not(:empty) {
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--error-color);
}

/* Login Button */
.login-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 15px;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    margin-bottom: 20px;
    height: 45px;
}

.login-button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 77, 237, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.login-button .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Welcome Message Area - alinhado com o formulário */
.welcome-message {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: 15px;
    padding-top: 0;
}

.welcome-message h2 {
    margin-bottom: 15px;
    color: white;
    font-weight: 600;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-box {
    margin: 10px auto 20px;
    max-width: 320px;
    position: relative;
    transition: opacity 0.5s ease;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-box:before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 60px;
    color: rgba(255, 255, 255, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.quote {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 2;
}

/* Support Link - alinhado com o footer */
.support-link {
    margin-top: auto;
    position: relative;
    z-index: 2;
    padding-top: 20px;
    width: 100%;
    text-align: center;
}

.support {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    position: relative;
}

.support:before {
    content: "\f059";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
    font-size: 12px;
}

.support:hover {
    color: white;
}

/* Footer */
.login-footer {
    margin-top: auto;
    font-size: 12px;
    color: #888;
    text-align: center;
    padding-top: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.form-error {
    animation: pulse 0.5s;
}

/* Efeito 3D suave */
.login-card:hover {
    transform: perspective(1500px) rotateY(1deg);
}

@media (max-width: 768px) {
    .login-card:hover {
        transform: none;
    }
    
    .login-card {
        flex-direction: column-reverse;
        height: auto;
    }
    
    .login-left, 
    .login-right {
        padding: 30px 20px;
    }
    
    .login-right {
        min-height: 250px;
    }
    
    .login-logo img {
        max-width: 150px;
    }
    
    .welcome-message h2 {
        font-size: 24px;
    }
    
    .message-box {
        min-height: 80px;
        padding: 15px;
    }
    
    .message-box:before {
        font-size: 40px;
    }
    
    .quote {
        font-size: 16px;
    }
}

/* Animação para troca de mensagens */
@keyframes fadeInMessage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-box {
    animation: fadeInMessage 0.5s ease-out forwards;
}

/* Refinando a animação do fundo */
@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
    
    .floating-shape {
        animation: none;
    }
}

/* Grid de fundo sutil */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    z-index: -2;
    pointer-events: none;
}

/* Ajustes específicos para garantir o alinhamento com as marcações */
.input-group:first-child {
    margin-top: 0;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    height: 45px;
}

.form-footer {
    margin: 10px 0 15px;
}

.login-button {
    margin-bottom: 20px;
    height: 45px;
}

.form-content {
    margin-top: 0;
}

/* Containers para os elementos principais */
.login-top-content, .login-bottom-content {
    display: flex;
    flex-direction: column;
}

.login-top-content {
    flex: 1;
}

.login-bottom-content {
    margin-top: auto;
}

/* Ajuste fino para mensagem motivacional alinhar com o formulário */
.message-box {
    height: 170px;
    margin: 10px auto 20px;
}

/* Alinhamento dos botões de social login */
.social-login {
    margin: 10px 0 15px;
}

/* Espaçamento no topo do formulário e boas-vindas */
#login-form, .welcome-message {
    padding-top: 5px;
}

/* Melhor alinhamento dos títulos */
.login-header, .login-logo {
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    margin-top: 0;
}

.login-header h2, .welcome-message h2 {
    margin: 0;
    line-height: 1.2;
}

.social-login, .welcome-message > h2 {
    height: 40px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider {
    margin: 10px 0 15px;
}

.form-content {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.message-box {
    margin-top: 10px;
}

.input-group:first-child {
    margin-top: 0;
}

.input-group:last-of-type {
    margin-bottom: 10px;
}

/* Ajuste fino nos paddings do card */
.login-left, .login-right {
    padding: 30px 50px;
}

/* Melhor alinhamento da seção social com o "Olá" */
.social-login {
    margin: 10px 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-message > h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 15px;
    height: 50px;
    font-size: 32px;
    color: white;
    font-weight: 600;
}

/* Melhor altura para o copyright e "Precisa de ajuda?" */
.login-footer, .support-link {
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Alinhar os inputs com a mensagem motivacional */
.form-content {
    display: flex;
    flex-direction: column;
    margin-top: 0px;
    min-height: 170px;
}

/* Ajuste na distância entre "Olá, administrador!" e a caixa de mensagem */
.welcome-message h2 {
    margin-bottom: 15px;
} 