/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary-color: #004e89;
    --accent-color: #1a659e;
    --success-color: #06d6a0;
    --error-color: #ef476f;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Container principal */
.login-container {
    display: flex;
    width: 95%;
    max-width: 1200px;
    min-height: 650px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

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

/* Lado esquerdo - Informações */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo-wrapper {
    margin-bottom: 30px;
    animation: scaleIn 0.6s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.brand-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.brand-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.6s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.brand-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    font-weight: 300;
    animation: slideInLeft 0.6s ease-out 0.4s both;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white);
    font-size: 1rem;
    opacity: 0;
    animation: slideInLeft 0.6s ease-out forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.5s; }
.feature-item:nth-child(2) { animation-delay: 0.6s; }
.feature-item:nth-child(3) { animation-delay: 0.7s; }
.feature-item:nth-child(4) { animation-delay: 0.8s; }

.feature-item i {
    font-size: 1.3rem;
    color: var(--success-color);
}

/* Lado direito - Formulário */
.login-right {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 40px;
    animation: slideInRight 0.6s ease-out 0.3s both;
}

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

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-header p {
    font-size: 1rem;
    color: var(--text-light);
}

/* Formulário */
.login-form {
    animation: slideInRight 0.6s ease-out 0.4s both;
}

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

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: var(--border-radius);
    background: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.input-wrapper input:focus ~ i,
.input-wrapper input:focus + i {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 16px;
    left: auto;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

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

/* Opções do formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Botão de login */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
    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.3), transparent);
    transition: left 0.5s;
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.4);
}

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

.btn-login i {
    transition: var(--transition);
}

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

.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Alerta */
.alert-message {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-message.show {
    display: block;
}

.alert-message.error {
    background-color: #fee;
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-message.success {
    background-color: #e8f8f5;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* Footer */
.login-footer {
    margin-top: 40px;
    text-align: center;
    animation: slideInRight 0.6s ease-out 0.5s both;
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsividade */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }

    .login-left {
        padding: 40px 30px;
    }

    .brand-title {
        font-size: 2rem;
    }

    .brand-subtitle {
        font-size: 1rem;
    }

    .features {
        margin-top: 30px;
    }

    .feature-item {
        font-size: 0.9rem;
    }

    .login-right {
        padding: 40px 30px;
    }

    .logo-wrapper {
        margin-bottom: 20px;
    }

    .brand-logo {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 576px) {
    .login-container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-left {
        padding: 30px 20px;
    }

    .login-right {
        padding: 30px 20px;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .login-header h2 {
        font-size: 1.6rem;
    }

    .features {
        gap: 15px;
    }
}

/* Animação de carregamento */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-login.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
