<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            background-color: #3b82f6;
            color: white;
            padding: 20px;
            text-align: center;
            border-radius: 5px;
        }
        .content {
            background-color: #f9fafb;
            padding: 20px;
            margin-top: 20px;
            border-radius: 5px;
        }
        .info-box {
            background-color: white;
            padding: 15px;
            margin: 15px 0;
            border-left: 4px solid #3b82f6;
        }
        .info-box table {
            width: 100%;
            border-collapse: collapse;
        }
        .info-box td {
            padding: 8px 0;
        }
        .info-box td:first-child {
            font-weight: bold;
            width: 40%;
        }
        .button {
            display: inline-block;
            padding: 12px 24px;
            background-color: #10b981;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            margin-top: 15px;
        }
        .footer {
            text-align: center;
            color: #6b7280;
            font-size: 12px;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #e5e7eb;
        }
        .warning {
            background-color: #fef3c7;
            border-left: 4px solid #f59e0b;
            padding: 12px;
            margin: 15px 0;
            border-radius: 4px;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>🔐 {{ _('Client Portal Access') }}</h1>
    </div>
    
    <div class="content">
        <p>Hello {{ client.contact_person or client.name }},</p>
        
        <p>You have been granted access to the <strong>TimeTracker Client Portal</strong> for <strong>{{ client.name }}</strong>.</p>
        
        <div class="info-box">
            <table>
                <tr>
                    <td>Portal Username:</td>
                    <td><strong>{{ client.portal_username }}</strong></td>
                </tr>
                <tr>
                    <td>Client:</td>
                    <td>{{ client.name }}</td>
                </tr>
            </table>
        </div>
        
        <p>To complete your portal setup, please set your password by clicking the button below:</p>
        
        <center>
            <a href="{{ setup_url }}" class="button">
                {{ _('Set Your Password') }}
            </a>
        </center>
        
        <div class="warning">
            <strong>⚠️ Important:</strong> This link will expire in 24 hours. If you need a new link, please contact your administrator.
        </div>
        
        <p>Once you've set your password, you'll be able to:</p>
        <ul>
            <li>View your projects and their status</li>
            <li>Access invoices and payment information</li>
            <li>Review time entries for your projects</li>
        </ul>
        
        <p>If you did not request this access, please contact your administrator immediately.</p>
    </div>
    
    <div class="footer">
        <p>TimeTracker - Time Tracking & Project Management</p>
        <p>This is an automated email. Please do not reply to this message.</p>
    </div>
</body>
</html>

