/* Authentication Pages Stylesheet */

.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-container {
    width: 100%;
    padding: 2rem 0;
}

.auth-card {
    border: none;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.auth-card .card-body {
    padding: 3rem;
}

.auth-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.auth-form .input-group-text {
    border: 2px solid #e9ecef;
    border-right: none;
    background-color: #f8f9fa;
    color: #6c757d;
}

.auth-form .input-group .form-control {
    border-left: none;
}

.auth-form .input-group:focus-within .input-group-text {
    border-color: #0066cc;
    background-color: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #dee2e6;
}

.divider-text {
    background-color: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.password-strength .progress {
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength .progress-bar {
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #0066cc;
    border-color: #0066cc;
}

.form-check-input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Social Login Buttons */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-google {
    background-color: #db4437;
    border-color: #db4437;
    color: white;
}

.btn-google:hover {
    background-color: #c23321;
    border-color: #c23321;
    color: white;
    transform: translateY(-1px);
}

.btn-facebook {
    background-color: #3b5998;
    border-color: #3b5998;
    color: white;
}

.btn-facebook:hover {
    background-color: #2d4373;
    border-color: #2d4373;
    color: white;
    transform: translateY(-1px);
}

/* Form Validation States */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.44 1.44L7.4 4.5l.94.94L4.66 9.17z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card .card-body {
        padding: 2rem 1.5rem;
    }
    
    .auth-container {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .auth-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .auth-page {
        padding: 1rem;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .auth-page {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .auth-card {
        background: rgba(45, 55, 72, 0.95);
        color: #f7fafc;
    }
    
    .auth-form .form-control {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    .auth-form .form-control:focus {
        background-color: #2d3748;
        border-color: #0066cc;
        color: #f7fafc;
    }
    
    .auth-form .input-group-text {
        background-color: #4a5568;
        border-color: #4a5568;
        color: #a0aec0;
    }
    
    .divider-text {
        background-color: rgba(45, 55, 72, 0.95);
        color: #a0aec0;
    }
    
    .alert-danger {
        background-color: rgba(220, 53, 69, 0.2);
        color: #feb2b2;
    }
    
    .alert-success {
        background-color: rgba(40, 167, 69, 0.2);
        color: #9ae6b4;
    }
    
    .alert-warning {
        background-color: rgba(255, 193, 7, 0.2);
        color: #faf089;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid #000;
    }
    
    .auth-form .form-control {
        border-width: 2px;
    }
    
    .auth-form .btn-primary {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .auth-form .form-control,
    .auth-form .btn-primary,
    .btn-social {
        transition: none;
    }
    
    .auth-form .btn-primary:hover,
    .btn-social:hover {
        transform: none;
    }
    
    .btn.loading::after {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
.auth-form .form-control:focus,
.auth-form .btn:focus,
.form-check-input:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Custom Checkbox Styling */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* Password Toggle Button */
.input-group .btn-outline-secondary {
    border-left: none;
    border-color: #e9ecef;
    color: #6c757d;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #0066cc;
    color: #0066cc;
}

/* Form Text and Help Text */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Animation for form elements */
.auth-form .form-floating > label {
    transition: all 0.3s ease;
}

.auth-form .form-floating > .form-control:focus ~ label,
.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #0066cc;
}

/* Benefits section styling */
.card.bg-light {
    background-color: rgba(248, 249, 250, 0.8) !important;
    backdrop-filter: blur(5px);
}

.card.bg-light .card-body {
    padding: 1.5rem;
}

.card.bg-light i {
    font-size: 1.5rem;
}

/* Logo hover effect */
.auth-card img {
    transition: transform 0.3s ease;
}

.auth-card img:hover {
    transform: scale(1.05);
}