/* CSS Moderno para Páginas de Autenticação */
:root {
    --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%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --bg-color: #f8f9fd;
    --card-shadow: 0 20px 60px rgba(0,0,0,0.1);
    --input-shadow: 0 4px 15px rgba(0,0,0,0.08);
    --button-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

body {
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Efeito de partículas de fundo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="2" fill="rgba(102,126,234,0.1)"/><circle cx="75" cy="25" r="1.5" fill="rgba(255,119,198,0.1)"/><circle cx="25" cy="75" r="1" fill="rgba(120,219,255,0.1)"/><circle cx="75" cy="75" r="2.5" fill="rgba(67,233,123,0.1)"/></svg>');
    animation: float 20s infinite linear;
    pointer-events: none;
    z-index: -1;
}

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

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: slideUp 0.8s ease-out;
}

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

.auth-card {
    background: white;
    border-radius: 25px;
    box-shadow: var(--card-shadow);
    border: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.auth-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.auth-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.auth-body {
    padding: 2rem 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-shadow: var(--input-shadow);
    position: relative;
}

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

.form-control:hover {
    border-color: #667eea;
    background: white;
}

.form-control::placeholder {
    color: #adb5bd;
    font-size: 0.9rem;
}

.btn-primary-auth {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 15px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.btn-primary-auth:active {
    transform: translateY(-1px);
}

.btn-outline-auth {
    width: 100%;
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 15px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-outline-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline-auth:hover::before {
    width: 100%;
}

.btn-outline-auth:hover {
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

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

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: #adb5bd;
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.auth-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    /*-webkit-text-fill-color: transparent;*/
    background-clip: text;
}

.alert-custom {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.alert-success {
    background: rgba(67, 233, 123, 0.1);
    border-color: #43e97b;
    color: #155724;
}

.alert-danger {
    background: rgba(245, 87, 108, 0.1);
    border-color: #f5576c;
    color: #721c24;
}

.alert-info {
    background: rgba(79, 172, 254, 0.1);
    border-color: #4facfe;
    color: #0c5460;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.input-group {
    position: relative;
}

.input-group-text {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.input-group-text:hover {
    color: #667eea;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

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

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.btn-loading span {
    opacity: 0;
}

/* Responsividade */
@media (max-width: 576px) {
    .auth-container {
        max-width: 100%;
        margin: 0 0.5rem;
    }
    
    .auth-card {
        border-radius: 20px;
    }
    
    .auth-header {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-body {
        padding: 1.5rem 1rem;
    }
    
    .form-control {
        padding: 0.75rem 0.875rem;
    }
    
    .btn-primary-auth,
    .btn-outline-auth {
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 400px) {
    .auth-container {
        margin: 0 0.25rem;
    }
    
    .auth-body {
        padding: 1rem 0.75rem;
    }
}

/* Animações para elementos */
.form-group {
    animation: fadeInUp 0.6s ease-out;
}

.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; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-links {
    animation: fadeIn 0.8s ease-out 0.5s both;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Efeitos especiais para interações */
.form-control:focus + .form-label {
    color: #667eea;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}
