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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container principal */
.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Card de autenticação */
.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

/* Header */
.auth-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.logo {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* Conteúdo */
.auth-content {
    padding: 30px;
}

/* Mensagens */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.hidden {
    display: none;
}

/* Formulário */
.auth-form {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #25d366;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.form-group input:invalid {
    border-color: #ef4444;
}

/* Input de senha */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #374151;
}

/* Feedback dos campos */
.field-feedback {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
}

.field-feedback.success {
    color: #059669;
}

.field-feedback.error {
    color: #dc2626;
}

/* Indicador de força da senha */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #dc2626;
    transition: all 0.3s ease;
}

.password-strength.weak::before {
    width: 33%;
    background: #dc2626;
}

.password-strength.medium::before {
    width: 66%;
    background: #f59e0b;
}

.password-strength.strong::before {
    width: 100%;
    background: #059669;
}

/* Botões */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    margin-bottom: 20px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

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

/* Botões sociais */
.btn-social {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    margin-bottom: 12px;
}

.btn-social:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
}

.btn-google:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.btn-facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

/* Loading state */
.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-text.hidden,
.btn-loading.hidden {
    display: none;
}

/* Divisor */
.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    background: white;
    padding: 0 20px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* Botões sociais */
.social-buttons {
    margin-bottom: 30px;
}

/* Footer */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    color: #6b7280;
    font-size: 14px;
}

.auth-footer a {
    color: #25d366;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #128c7e;
}

/* Responsividade */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        border-radius: 12px;
    }
    
    .auth-header {
        padding: 30px 20px 15px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-content {
        padding: 20px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
}

/* Animações adicionais */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

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

/* Estados de validação */
.form-group.valid input {
    border-color: #059669;
    background: #f0fdf4;
}

.form-group.invalid input {
    border-color: #dc2626;
    background: #fef2f2;
}

/* Melhorias de acessibilidade */
.btn:focus,
input:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .auth-card {
        background: #1f2937;
        color: white;
    }
    
    .form-group input {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .form-group input:focus {
        background: #4b5563;
    }
    
    .btn-social {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .divider::before {
        background: #4b5563;
    }
    
    .divider span {
        background: #1f2937;
        color: #9ca3af;
    }
    
    .auth-footer {
        border-color: #4b5563;
    }
    
    .auth-footer p {
        color: #9ca3af;
    }
}
