<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Password Reset Request</title>
    <style>
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8fafc; margin: 0; padding: 0; color: #1e293b; }
        .container { max-width: 540px; margin: 40px auto; background-color: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
        .header { background-color: #4f46e5; padding: 30px; text-align: center; color: #ffffff; }
        .header h1 { margin: 0; font-size: 24px; font-weight: 600; }
        .content { padding: 35px 30px; line-height: 1.6; font-size: 16px; }
        .button-wrap { text-align: center; margin: 35px 0; }
        .button { display: inline-block; background-color: #4f46e5; color: #ffffff; text-decoration: none; padding: 14px 28px; border-radius: 8px; font-weight: 600; letter-spacing: 0.5px; }
        .footer { background-color: #f1f5f9; padding: 20px; text-align: center; font-size: 13px; color: #64748b; }
        .text-muted { color: #64748b; font-size: 14px;}
        .alert { background-color: #fef2f2; border: 1px solid #fecaca; color: #ef4444; padding: 12px; border-radius: 8px; font-size: 14px; text-align: center; margin-top: 15px;}
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>SwiftPOS Security</h1>
        </div>
        <div class="content">
            <p>Hello <strong>{% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user.username }}{% endif %}</strong>,</p>
            <p>We received a request to reset the password for your SwiftPOS account. To maintain the security of your account, please click the button below to choose a new password.</p>
            
            <div class="button-wrap">
                <a href="{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}" class="button">Reset Password</a>
            </div>
            
            <p class="text-muted">Or copy and paste this link into your browser:</p>
            <p class="text-muted" style="word-break: break-all;">
                <a href="{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}" style="color: #4f46e5;">
                    {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
                </a>
            </p>

            <div class="alert">
                <strong>IMPORTANT:</strong> This link is valid for exactly <strong>30 minutes</strong>.
            </div>

            <p style="margin-top: 30px; font-size: 15px;">
                If you did not request a password reset, you can safely ignore this email. Your password will not change.
            </p>
        </div>
        <div class="footer">
            &copy; {% now "Y" %} SwiftPOS. Secure Retail System.<br>
            Please do not reply to this automated email.
        </div>
    </div>
</body>
</html>
