:root {
    --primary-color: var(--cor-principal);
    --secondary-color: var(--cor-secundaria);
    --text-color: var(--cor-texto);
    --success-color: #198754;
    --error-color: #dc3545;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--cor-principal) 0%, var(--cor-secundaria) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: auto;
    perspective: 1000px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.5rem;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
    transform: translateZ(30px);
}

.login-logo img {
    max-width: 180px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.05);
}

.empresa-nome {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-floating {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    padding: 1rem 1rem 0.5rem;
    height: auto;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    border-color: var(--primary-color);
    background-color: #fff;
}

.input-group .form-control {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-text {
    background: transparent;
    border-radius: 0 12px 12px 0;
    border: 2px solid #e0e0e0;
    border-left: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.75rem;
}

.input-group-text:hover {
    color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(45deg, var(--cor-principal), var(--cor-secundaria));
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--cor-principal-rgb), 0.3);
    background: linear-gradient(45deg, var(--cor-secundaria), var(--cor-principal));
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    margin-right: 8px;
    font-size: 1.1em;
}

.alert {
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: none;
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    font-size: 0.9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alert i {
    font-size: 1.1em;
}

/* Animação de loading no botão */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Efeito de foco nos campos */
.form-floating label {
    padding: 1rem 0.75rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: var(--primary-color);
}

/* Validação visual */
.form-control.is-invalid {
    border-color: var(--error-color);
    box-shadow: none;
}

.form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: none;
}

/* Rodapé */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 1rem;
    color: var(--cor-terciaria);
    font-size: 0.9rem;
}

.footer a {
    color: var(--cor-terciaria);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
    color: var(--cor-terciaria);
}

.footer-separator {
    margin: 0 10px;
    opacity: 0.7;
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-logo img {
        max-width: 150px;
    }
    
    .empresa-nome {
        font-size: 1.2rem;
    }

    .btn-primary {
        padding: 0.75rem;
    }
    
    .footer {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    .footer-separator {
        margin: 0 5px;
    }
}
