/* ============================================
   Páginas de Autenticação - Design Moderno
   ============================================ */

/* Background animado com gradiente */
body.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container de autenticação */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

/* Card de autenticação */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-xl);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Header do card */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-header .brand-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin-top: var(--spacing-md);
    font-weight: 400;
}

/* Formulário */
.auth-form {
    margin-top: var(--spacing-xl);
}

.auth-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.auth-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.auth-form .form-control {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    background: white;
}

.auth-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.auth-form .form-control:hover {
    border-color: #764ba2;
}

/* Botão de submit */
.auth-form .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    border-radius: 12px;
    box-shadow: 
        0 4px 14px 0 rgba(59, 130, 246, 0.4),
        0 2px 4px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
}

.auth-form .btn-primary::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.6s ease;
}

.auth-form .btn-primary:hover::before {
    left: 100%;
}

.auth-form .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow: 
        0 6px 20px 0 rgba(59, 130, 246, 0.5),
        0 2px 6px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.auth-form .btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px 0 rgba(59, 130, 246, 0.3),
        0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.auth-form .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer do auth */
.auth-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.auth-footer a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.auth-footer a:hover::after {
    width: 100%;
}

.auth-footer a:hover {
    color: #764ba2;
}

/* Erros */
.form-error {
    color: #ef4444;
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: none;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-error:not(:empty) {
    display: flex;
}

.form-control.error {
    border-color: #ef4444;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Card de convite responsivo */
.auth-card .card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.auth-card .card-body {
    padding: 1.25rem;
}

.auth-card .card-body h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.auth-card .card-body h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.auth-card .card-body p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .auth-card {
        padding: 1.5rem;
        margin: 0;
        max-width: 100%;
        border-radius: 16px;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-header .brand-icon {
        font-size: 2rem;
    }
    
    .auth-subtitle {
        font-size: 0.9375rem;
        margin-top: 0.5rem;
    }
    
    .auth-form {
        margin-top: 1rem;
    }
    
    .auth-form .form-group {
        margin-bottom: 1.25rem;
    }
    
    .auth-form .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .auth-form .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        min-height: 48px;
    }
    
    .auth-footer {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .auth-footer p {
        font-size: 0.875rem;
    }
    
    /* Card de convite mobile */
    .auth-card .card-body {
        padding: 1rem;
    }
    
    .auth-card .card-body h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-card .card-body h4 {
        font-size: 0.9375rem;
    }
    
    .auth-card .card-body p {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.75rem;
        padding-top: 1.5rem;
    }
    
    .auth-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header .brand-icon {
        font-size: 1.75rem;
    }
    
    .auth-form .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .auth-form .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .auth-card .card-body {
        padding: 0.875rem;
    }
}

/* Partículas decorativas */
.auth-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

