<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcome to PX360</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            background-color: #ffffff;
            border-radius: 8px;
            padding: 40px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        .header {
            text-align: center;
            margin-bottom: 30px;
        }
        .logo {
            font-size: 28px;
            font-weight: bold;
            color: #0d6efd;
        }
        h1 {
            color: #0d6efd;
            font-size: 24px;
            margin-bottom: 20px;
        }
        .greeting {
            font-size: 18px;
            margin-bottom: 20px;
        }
        .content {
            margin-bottom: 30px;
        }
        .button {
            display: inline-block;
            background-color: #0d6efd;
            color: #ffffff !important;
            text-decoration: none;
            padding: 14px 30px;
            border-radius: 6px;
            font-weight: bold;
            font-size: 16px;
            margin: 20px 0;
        }
        .button:hover {
            background-color: #0b5ed7;
        }
        .button-container {
            text-align: center;
            margin: 30px 0;
        }
        .expiry-notice {
            background-color: #fff3cd;
            border: 1px solid #ffc107;
            border-radius: 6px;
            padding: 15px;
            margin: 20px 0;
            font-size: 14px;
        }
        .expiry-notice strong {
            color: #856404;
        }
        .footer {
            margin-top: 40px;
            padding-top: 20px;
            border-top: 1px solid #eee;
            font-size: 12px;
            color: #666;
            text-align: center;
        }
        .link-fallback {
            font-size: 12px;
            color: #666;
            word-break: break-all;
            margin-top: 15px;
        }
        ul {
            padding-left: 20px;
        }
        li {
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="logo">PX360</div>
            <p style="color: #666; margin-top: 5px;">Patient Experience Platform</p>
        </div>
        
        <h1>Welcome to PX360!</h1>
        
        <p class="greeting">Hello {{ user.first_name|default:user.email }},</p>
        
        <div class="content">
            <p>You have been invited to join PX360, our comprehensive Patient Experience management platform. To complete your account setup, please click the button below:</p>
            
            <div class="button-container">
                <a href="{{ activation_url }}" class="button">Complete Account Setup</a>
            </div>
            
            <p>During the onboarding process, you will:</p>
            <ul>
                <li>Learn about PX360 features and your role responsibilities</li>
                <li>Review and acknowledge important policies and guidelines</li>
                <li>Set up your username and password</li>
                <li>Complete your profile information</li>
            </ul>
        </div>
        
        <div class="expiry-notice">
            <strong>⏰ Important:</strong> This invitation link will expire on <strong>{{ expires_at|date:"F j, Y, g:i a" }}</strong>. Please complete your registration before this date.
        </div>
        
        <p class="link-fallback">
            If the button above doesn't work, copy and paste this link into your browser:<br>
            <a href="{{ activation_url }}">{{ activation_url }}</a>
        </p>
        
        <div class="footer">
            <p>This is an automated message from PX360. Please do not reply to this email.</p>
            <p>If you did not expect this invitation or have questions, please contact your system administrator.</p>
            <p>&copy; {{ "now"|date:"Y" }} PX360 - Patient Experience Platform</p>
        </div>
    </div>
</body>
</html>
