:root {
    --azul-bep: #2e2f87;
    --azul-dark: #272560;
    --laranja-bep: #fb9d08;
    --laranja-sec: #eb5b2a;
    --azul-escuro: #1a1b4b;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-y: auto;
}

/* BACKGROUND ANIMADO */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--azul-bep) 0%, var(--azul-dark) 100%);
}

.background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
}

.background::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(251, 157, 8, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* PARTICULAS */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    from {
        transform: translateY(100vh) translateX(-100%);
    }
    to {
        transform: translateY(-100vh) translateX(100%);
    }
}

/* CONTAINER PRINCIPAL */
.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARD DE LOGIN */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 32px;
    padding: 40px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
}

/* LOGO */
.logo-container {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--azul-bep) 0%, var(--azul-dark) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 10px 20px -5px rgba(46, 47, 135, 0.4);
}

.logo-icon i {
    font-size: 42px;
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 27px;
    background: linear-gradient(135deg, var(--laranja-bep), var(--laranja-sec));
    opacity: 0.3;
    z-index: -1;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.logo-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--azul-bep);
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.logo-text p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.logo-text p i {
    color: var(--laranja-bep);
    font-size: 16px;
}

/* FORMULÁRIO */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.form-label i {
    color: var(--azul-bep);
    font-size: 16px;
}

/* INPUTS MODERNOS */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 18px;
    transition: var(--transition);
    z-index: 2;
}

.form-control {
    width: 100%;
    height: 56px;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 0 20px 0 52px;
    font-size: 15px;
    color: #1e293b;
    transition: var(--transition);
    background: white;
    box-shadow: 0 4px 6px -2px rgba(0,0,0,0.05);
}

.form-control:focus {
    border-color: var(--azul-bep);
    box-shadow: 0 0 0 4px rgba(46, 47, 135, 0.1), 0 4px 8px -2px rgba(0,0,0,0.1);
    outline: none;
}

.form-control:focus + .input-icon {
    color: var(--azul-bep);
}

.form-control:hover:not(:focus) {
    border-color: #cbd5e1;
}

/* TOGGLE SENHA */
.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

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

/* OPÇÕES ADICIONAIS */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    accent-color: var(--azul-bep);
}

.remember-me span {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.forgot-password {
    font-size: 14px;
    color: var(--azul-bep);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--laranja-bep);
}

/* BOTÃO PRINCIPAL */
.btn-login {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--laranja-bep) 0%, var(--laranja-sec) 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px -8px rgba(251, 157, 8, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -8px rgba(235, 91, 42, 0.6);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login i {
    font-size: 20px;
    transition: var(--transition);
}

.btn-login:hover i {
    transform: translateX(5px);
}

/* DIVIDER */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

/* LINK DE CADASTRO */
.register-link {
    text-align: center;
}

.register-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--azul-bep);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 40px;
    background: rgba(46, 47, 135, 0.05);
    transition: var(--transition);
    border: 2px solid transparent;
}

.register-link a:hover {
    background: rgba(46, 47, 135, 0.1);
    transform: translateY(-2px);
    border-color: rgba(46, 47, 135, 0.2);
}

.register-link i {
    font-size: 18px;
}

.register-link small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 8px;
}

/* MENSAGEM DE ERRO */
.error-message {
    background: #fef2f2;
    border: 2px solid #fee2e2;
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message i {
    color: #dc2626;
    font-size: 20px;
}

.error-message span {
    color: #991b1b;
    font-size: 14px;
    font-weight: 500;
}

/* FEATURES */
.features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px solid rgba(255,255,255,0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 500;
}

.feature-item i {
    color: var(--laranja-bep);
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .logo-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }

    .logo-text h2 {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .features {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

/* LOADING STATE */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading i {
    animation: spin 1s linear infinite;
}

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