/* 🎨 ====================================
   VARIÁVEIS CSS & PROPRIEDADES CUSTOMIZADAS
   ==================================== */
:root {
    /* 🌈 Gradientes de Cores */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* ✨ Efeito Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* 🌟 Sombras Personalizadas */
    --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.1);
    
    /* 🎭 Bordas & Transições */
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🔄 ====================================
   RESET GERAL & ESTILOS BASE
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  overflow-y: auto !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible !important;
}

/* 🎪 ====================================
   ANIMAÇÕES DE FUNDO FLUTUANTES
   ==================================== */
.bg-animation {
    background: var(--primary-gradient);
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.floating-shapes {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 8s ease-in-out infinite;
}

/* 🎯 Variantes das Formas Flutuantes */
.shape-1 { 
    width: 120px; 
    height: 120px; 
    top: 10%; 
    left: 10%; 
    animation-delay: 0s; 
}

.shape-2 { 
    width: 80px; 
    height: 80px; 
    top: 20%; 
    right: 15%; 
    animation-delay: 3s; 
}

.shape-3 { 
    width: 100px; 
    height: 100px; 
    bottom: 15%; 
    left: 20%; 
    animation-delay: 6s; 
}

.shape-4 { 
    width: 60px; 
    height: 60px; 
    bottom: 30%; 
    right: 10%; 
    animation-delay: 2s; 
}

/* 🏠 ====================================
   CONTAINER PRINCIPAL
   ==================================== */
.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🎖️ ====================================
   SEÇÃO DO LOGO & MARCA
   ==================================== */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-img {
    display: block;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    max-width: 220px;
    height: auto;
}

/* ✍️ ====================================
   TIPOGRAFIA & TEXTOS
   ==================================== */
.subtitle {
    color: #64748b;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 0;
    text-align: center;
}

/* 📝 ====================================
   COMPONENTES DO FORMULÁRIO
   ==================================== */

/* 📋 Grupos de Campos */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.025em;
}

/* 🎯 Container dos Inputs & Ícones */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    z-index: 1;
}

/* ✏️ Campos de Input */
.form-group input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    background: #f9fafb;
    color: #1f2937;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input:focus + .input-icon {
    color: #667eea;
}

/* 👁️ Botão de Mostrar/Ocultar Senha */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    transition: var(--transition);
}

.password-toggle:hover {
    color: #667eea;
}

/* 🚀 ====================================
   BOTÕES & INTERAÇÕES
   ==================================== */
.login-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.025em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

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

.login-btn::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;
}

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

/* 🎨 Link de Cadastro */
.register-link {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 0;
}

.register-link p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.register-btn-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.register-btn-link:hover {
    color: #5a67d8;
    text-decoration: none;
}

.register-btn-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.register-btn-link:hover::after {
    width: 100%;
}

/* 💬 ====================================
   COMPONENTES DE MENSAGENS
   ==================================== */

/* ❌ Mensagens de Erro */
.error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    animation: shake 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 💡 Caixa de Informações */
.login-info {
    background: var(--secondary-gradient);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

/* ⏳ ====================================
   ESTADOS DE CARREGAMENTO
   ==================================== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 🎬 ====================================
   ANIMAÇÕES & KEYFRAMES
   ==================================== */

/* 🎈 Animação Flutuante para Formas do Fundo */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.7;
    }
    33% { 
        transform: translateY(-30px) rotate(120deg); 
        opacity: 1;
    }
    66% { 
        transform: translateY(15px) rotate(240deg); 
        opacity: 0.8;
    }
}

/* ⬆️ Animação de Deslizar para Cima do Container */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ✨ Animação de Brilho para o Logo */
@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

/* 🔄 Animação de Tremor para Mensagens de Erro */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* 🌪️ Animação de Rotação para Carregamento */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 📱 ====================================
   DESIGN RESPONSIVO
   ==================================== */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 32px 24px;
        max-width: none;
    }
    
    h1 {
        font-size: 28px;
    }

    .app-logo {
        width: 72px;
        height: 72px;
    }

}