/* Authentication Pages Styles */

.auth-page {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, 
        rgba(13, 110, 253, 0.05) 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(13, 110, 253, 0.05) 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.auth-header {
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 3rem;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--bs-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

/* Social Authentication */
.social-auth-section {
    margin-bottom: 1.5rem;
}

.btn-google {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    color: #333;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}

.btn-google i {
    color: #4285f4;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

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

.divider span {
    background: white;
    padding: 0 1rem;
    color: var(--bs-secondary);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

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

.form-label {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    background: white;
}

.form-control.is-valid {
    border-color: var(--bs-success);
    background: rgba(25, 135, 84, 0.05);
}

.form-control.is-invalid {
    border-color: var(--bs-danger);
    background: rgba(220, 53, 69, 0.05);
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--bs-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

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

.password-help {
    margin-top: 0.5rem;
}

/* Form Check */
.form-check-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 0.5rem;
    border-radius: 4px;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--bs-secondary);
    margin-bottom: 0;
}

.forgot-password-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

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

/* Terms Section */
.terms-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--bs-primary);
}

.terms-section .form-check-label {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

/* Button Group for Logout */
.button-group {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.button-group .btn {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Footer */
.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.switch-auth {
    margin-bottom: 0;
    color: var(--bs-secondary);
    font-size: 0.875rem;
}

.auth-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--bs-danger);
    border-left: 4px solid var(--bs-danger);
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: var(--bs-success);
    border-left: 4px solid var(--bs-success);
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: var(--bs-danger);
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
    .auth-page {
        padding: 2rem 0;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 15px;
        margin: 1rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-icon {
        font-size: 2.5rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-google,
    .auth-submit-btn {
        padding: 0.75rem 1.25rem;
    }
    
    .form-check-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .button-group {
        gap: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
    
    .form-label {
        font-size: 0.75rem;
    }
    
    .form-control {
        padding: 0.625rem;
    }
}

@media (max-width: 399.98px) {
    .auth-page {
        padding: 1rem 0;
    }
    
    .auth-card {
        padding: 1.25rem 0.75rem;
        border-radius: 12px;
    }
    
    .auth-icon {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .divider {
        margin: 1rem 0;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Focus Management */
.form-control:focus,
.btn:focus {
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--bs-dark);
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .btn-google {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .btn-google,
    .auth-submit-btn,
    .form-control {
        transition: none;
        animation: none;
    }
    
    .auth-submit-btn:hover,
    .btn-google:hover {
        transform: none;
    }
}
