/* ========================================
   LITRIUMFLOW - LOGIN STYLES
   Estilos específicos da tela de login
   ======================================== */

/* ========================================
   1. CONTAINER PRINCIPAL
   ======================================== */

.login-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #202020;
}

/* ========================================
   2. PAINEL ESQUERDO - INFORMAÇÕES
   ======================================== */

.login-info-panel {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    position: relative;
    overflow: hidden;
}

/* Símbolos animados de fundo - múltiplos e discretos */

/* Símbolo 1 - Grande e central */
.login-info-panel::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background-image: url('../assets/images/simbolo-preto-litrium.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    filter: brightness(0) invert(1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatSymbol1 15s ease-in-out infinite;
    pointer-events: none;
}

/* Símbolo 2 - Superior direito */
.login-info-panel::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: url('../assets/images/simbolo-preto-litrium.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.06;
    filter: brightness(0) invert(1);
    top: -30px;
    right: -30px;
    animation: floatSymbol2 12s ease-in-out infinite;
    pointer-events: none;
}

/* Animações sutis de flutuação */

@keyframes floatSymbol1 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.06;
    }
    25% {
        transform: translate(-48%, -52%) scale(1.08) rotate(3deg);
        opacity: 0.08;
    }
    50% {
        transform: translate(-52%, -48%) scale(0.95) rotate(-2deg);
        opacity: 0.04;
    }
    75% {
        transform: translate(-50%, -51%) scale(1.05) rotate(1deg);
        opacity: 0.07;
    }
}

@keyframes floatSymbol2 {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.04;
    }
    33% {
        transform: rotate(5deg) scale(1.1);
        opacity: 0.06;
    }
    66% {
        transform: rotate(-3deg) scale(0.9);
        opacity: 0.03;
    }
}

@keyframes floatSymbol3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.05;
    }
    50% {
        transform: translate(20px, -30px) rotate(-5deg) scale(1.15);
        opacity: 0.07;
    }
}

@keyframes floatSymbol4 {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.03;
    }
    40% {
        transform: rotate(-8deg) scale(1.2);
        opacity: 0.05;
    }
    80% {
        transform: rotate(4deg) scale(0.85);
        opacity: 0.02;
    }
}

@keyframes floatSymbol5 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.04;
    }
    30% {
        transform: translate(-15px, 25px) rotate(6deg);
        opacity: 0.06;
    }
    70% {
        transform: translate(10px, -20px) rotate(-4deg);
        opacity: 0.03;
    }
}

/* Símbolos extras adicionais */
.floating-symbol {
    position: absolute;
    background-image: url('../assets/images/simbolo-preto-litrium.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Símbolo 3 - Inferior esquerdo */
.symbol-3 {
    width: 180px;
    height: 180px;
    opacity: 0.12;
    bottom: -20px;
    left: -20px;
    animation: floatSymbol3 14s ease-in-out infinite;
}

/* Símbolo 4 - Superior esquerdo */
.symbol-4 {
    width: 120px;
    height: 120px;
    opacity: 0.1;
    top: 10%;
    left: 5%;
    animation: floatSymbol4 10s ease-in-out infinite;
}

/* Símbolo 5 - Inferior direito */
.symbol-5 {
    width: 150px;
    height: 150px;
    opacity: 0.11;
    bottom: 15%;
    right: 8%;
    animation: floatSymbol5 13s ease-in-out infinite;
}

.info-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
    animation: fadeIn 0.8s ease-out;
}

.logo-large {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-xl);
    filter: brightness(0) invert(1);
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.info-content h1 {
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-2xl);
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.features {
    margin-top: var(--spacing-3xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
    animation: fadeIn 1s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.8s; }
.feature-item:nth-child(2) { animation-delay: 1s; }
.feature-item:nth-child(3) { animation-delay: 1.2s; }

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--color-white);
    min-width: 30px;
}

.feature-item span {
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 500;
}

/* ========================================
   3. PAINEL DIREITO - FORMULÁRIO
   ======================================== */

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    position: relative;
}

/* Conteúdo do Formulário */
.form-content {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.6s ease-out;
}

.form-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.logo-small {
    width: 60px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    filter: brightness(0) invert(1);
}

.form-header h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   4. FORMULÁRIO DE LOGIN
   ======================================== */

.login-form {
    margin-bottom: var(--spacing-xl);
}

/* Campo de Senha com Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

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

/* Opções do Formulário */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Checkbox Customizado */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--color-white);
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

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

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ========================================
   5. BOTÃO DE LOGIN COM LOADING
   ======================================== */

#loginButton {
    position: relative;
}

#loginButton .btn-loader {
    position: absolute;
}

#loginButton.loading .btn-text {
    opacity: 0;
}

#loginButton.loading .btn-loader {
    display: block !important;
}

#loginButton.loading {
    pointer-events: none;
}

/* ========================================
   6. FOOTER DO FORMULÁRIO
   ======================================== */

.form-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* ========================================
   7. RESPONSIVIDADE
   ======================================== */

@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .login-info-panel {
        display: none;
    }

    .login-form-panel {
        padding: var(--spacing-2xl) var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .form-content {
        max-width: 100%;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }

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

@media (max-width: 480px) {
    .login-form-panel {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .logo-small {
        width: 50px;
    }

    .btn-primary {
        padding: var(--spacing-md);
    }
}

/* ========================================
   8. ANIMAÇÕES ESPECÍFICAS
   ======================================== */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Estado de erro no formulário */
.form-group.has-error input {
    border-color: var(--color-error);
    animation: shake 0.3s ease-in-out;
}

.form-group.has-error label {
    color: var(--color-error);
}

/* ========================================
   9. MODAL DE RECUPERAÇÃO DE SENHA
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.4s ease-out;
}

.modal-recuperar {
    max-width: 450px;
}

.modal-header-recuperar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header-recuperar h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close-recuperar {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close-recuperar:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body-recuperar {
    padding: var(--spacing-xl);
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-xl);
    line-height: 1.5;
}

.form-actions-recuperar {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.form-actions-recuperar button {
    flex: 1;
}

/* Animações do modal */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsividade do modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 100%;
        margin: var(--spacing-md);
    }

    .modal-header-recuperar,
    .modal-body-recuperar {
        padding: var(--spacing-lg);
    }

    .form-actions-recuperar {
        flex-direction: column;
    }

    .form-actions-recuperar button {
        width: 100%;
    }
}
