﻿:root {
    /* Cores oficiais baseadas na identidade visual do Governo de PE */
    --pe-blue: #312682;
    --pe-green: #009541;
    --pe-yellow: #FFCA00;
    --pe-red: #E74C3C;
    --pe-white: #FFFFFF;
    --pe-dark: #2c3e50;
    --pe-light-bg: #f8f9fa;
    --pe-border: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.container-fluid {
    height: 100vh;
}

/* LADO ESQUERDO - LOGO E BRANDING (IMUTÁVEL) */
.logo-section {
    background: linear-gradient(135deg, var(--pe-white) 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .logo-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient( 45deg, rgba(49, 38, 130, 0.03) 0%, rgba(0, 149, 65, 0.03) 25%, rgba(255, 202, 0, 0.03) 50%, rgba(231, 76, 60, 0.03) 75%, rgba(49, 38, 130, 0.03) 100% );
        animation: colorFlow 8s ease-in-out infinite;
    }

@keyframes colorFlow {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.1;
    }
}

.logo-section img {
    max-height: 70vh;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    z-index: 1;
    position: relative;
}

.branding-text {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 1;
    color: var(--pe-dark);
}

    .branding-text h3 {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--pe-blue);
    }

    .branding-text p {
        color: #6c757d;
        margin: 0;
    }

/* LADO DIREITO - FORMULÁRIO */
.login-form-section {
    background: var(--pe-light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
}

    .login-form-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient( circle, rgba(49, 38, 130, 0.05) 0%, rgba(0, 149, 65, 0.05) 25%, rgba(255, 202, 0, 0.05) 50%, transparent 70% );
        animation: backgroundPulse 10s ease-in-out infinite;
    }

@keyframes backgroundPulse {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient( 90deg, var(--pe-blue) 0%, var(--pe-green) 25%, var(--pe-yellow) 50%, var(--pe-red) 75%, var(--pe-blue) 100% );
        background-size: 200% 100%;
        animation: gradientShift 6s ease-in-out infinite;
    }

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .login-header h2 {
        color: var(--pe-dark);
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .login-header p {
        color: #6c757d;
        margin: 0;
    }

/* INPUTS ESTILIZADOS */
.form-group label {
    color: var(--pe-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: white;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 12px 0 0 12px !important;
    color: #6c757d;
    transition: all 0.3s ease;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control-with-icon {
    border-left: none;
    border-radius: 0 12px 12px 0 !important;
}

.form-control:focus {
    border-color: var(--pe-blue);
    outline: none;
}

    .form-control:focus + .input-group-text,
    .input-group:focus-within .input-group-text {
        border-color: var(--pe-blue);
        color: var(--pe-blue);
    }

/* CHECKBOX PERSONALIZADO */
.form-check-input:checked {
    background-color: var(--pe-green);
    border-color: var(--pe-green);
}

.form-check-input:focus {
    border-color: var(--pe-green);
}

/* BOTÃO DE LOGIN */
.btn-login {
    background: linear-gradient( 135deg, var(--pe-blue) 0%, var(--pe-green) 50%, var(--pe-blue) 100% );
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-size: 1rem;
    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;
    }

    .btn-login:hover {
        background-position: 100% 0;
        transform: translateY(-2px);
    }

        .btn-login:hover::before {
            left: 100%;
        }

    .btn-login:active {
        transform: translateY(0);
    }

    /* EFEITO DE LOADING */
    .btn-login.loading {
        color: transparent;
        position: relative;
    }

        .btn-login.loading::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            top: 50%;
            left: 50%;
            margin-left: -10px;
            margin-top: -10px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* LINK "ESQUECI SENHA" */
.forgot-password .btn-link {
    color: var(--pe-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .forgot-password .btn-link:hover {
        text-decoration: underline;
        color: var(--pe-green);
    }

/* ALERTAS */
.alert {
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    border: none;
    margin-bottom: 1.5rem;
}

    .alert i {
        margin-right: 10px;
        font-size: 1.1rem;
    }

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--pe-red);
    border-left: 4px solid var(--pe-red);
}

.alert-success {
    background: rgba(0, 149, 65, 0.1);
    color: var(--pe-green);
    border-left: 4px solid var(--pe-green);
}

/* ANIMAÇÕES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVIDADE */
@media (max-width: 992px) {
    .logo-section {
        display: none;
    }

    .login-form-section {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .login-form-section {
        padding: 1rem;
    }
}

/* ELEMENTOS DECORATIVOS */
.decorative-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.element-1 {
    width: 100px;
    height: 100px;
    background: var(--pe-yellow);
    top: 10%;
    right: 15%;
    animation: float 6s ease-in-out infinite;
}

.element-2 {
    width: 60px;
    height: 60px;
    background: var(--pe-green);
    bottom: 20%;
    right: 25%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* MICRO-INTERAÇÕES */
.form-control:hover {
    border-color: #c0c0c0;
}

.input-group:hover .input-group-text {
    border-color: #c0c0c0;
}

.btn-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(49, 38, 130, 0.25);
}
