<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>New Contact Form Submission - GNX</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.7;
            color: #2c3e50;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            margin: 0;
            padding: 40px 20px;
        }
        
        .email-wrapper {
            max-width: 750px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
        }
        
        .email-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8b5cf6 100%);
            padding: 50px 40px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .email-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
        }
        
        .email-header h1 {
            color: #ffffff;
            font-size: 32px;
            font-weight: 700;
            margin: 0;
            position: relative;
            z-index: 2;
            letter-spacing: -0.5px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }
        
        .email-header .subtitle {
            color: rgba(255, 255, 255, 0.9);
            font-size: 16px;
            margin-top: 12px;
            font-weight: 300;
            position: relative;
            z-index: 2;
        }
        
        .priority-badge {
            display: inline-block;
            padding: 10px 24px;
            border-radius: 25px;
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 20px;
            position: relative;
            z-index: 2;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .priority-urgent {
            background: linear-gradient(135deg, #ff4757, #ee5a6f);
            color: white;
        }
        
        .priority-high {
            background: linear-gradient(135deg, #ff6b35, #ff8c42);
            color: white;
        }
        
        .priority-medium {
            background: linear-gradient(135deg, #ffa726, #ffb74d);
            color: white;
        }
        
        .priority-low {
            background: linear-gradient(135deg, #66bb6a, #81c784);
            color: white;
        }
        
        .email-body {
            padding: 50px 40px;
            background: #ffffff;
        }
        
        .section {
            margin-bottom: 35px;
            background: #ffffff;
            border-radius: 12px;
            border: 1px solid #e9ecef;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }
        
        .section:hover {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            transform: translateY(-2px);
        }
        
        .section-header {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 22px 28px;
            border-bottom: 1px solid #dee2e6;
        }
        
        .section h3 {
            font-size: 18px;
            font-weight: 700;
            color: #2c3e50;
            margin: 0;
            display: flex;
            align-items: center;
        }
        
        .section-icon {
            font-size: 22px;
            margin-right: 12px;
            display: inline-block;
            vertical-align: middle;
        }
        
        .section-body {
            padding: 28px;
        }
        
        .field {
            margin-bottom: 20px;
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
        }
        
        .field:last-child {
            margin-bottom: 0;
        }
        
        .field-label {
            font-weight: 700;
            color: #495057;
            min-width: 160px;
            margin-bottom: 8px;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .field-value {
            flex: 1;
            color: #2c3e50;
            font-size: 15px;
            line-height: 1.7;
            font-weight: 500;
        }
        
        .field-value a {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
        }
        
        .field-value a:hover {
            text-decoration: underline;
        }
        
        .message-content {
            background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
            border: 1px solid #e9ecef;
            border-left: 4px solid #daa520;
            border-radius: 8px;
            padding: 25px;
            margin-top: 12px;
            font-style: normal;
            line-height: 1.8;
            white-space: pre-wrap;
            color: #334155;
        }
        
        .email-footer {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            padding: 40px;
            text-align: center;
            color: rgba(255, 255, 255, 0.9);
            position: relative;
        }
        
        .email-footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
        }
        
        .footer-company {
            font-size: 18px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 8px;
        }
        
        .footer-tagline {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 25px;
        }
        
        .footer-note {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 15px;
            line-height: 1.7;
        }
        
        .company-info {
            margin-top: 25px;
            padding-top: 25px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .company-info strong {
            color: #ecf0f1;
            font-size: 15px;
        }
        
        .company-info p {
            color: rgba(255, 255, 255, 0.7);
            font-size: 13px;
            margin: 5px 0;
        }
        
        @media (max-width: 600px) {
            body {
                padding: 20px 10px;
            }
            
            .email-header {
                padding: 40px 25px;
            }
            
            .email-header h1 {
                font-size: 26px;
            }
            
            .email-body {
                padding: 35px 25px;
            }
            
            .section-body {
                padding: 20px;
            }
            
            .field {
                flex-direction: column;
            }
            
            .field-label {
                min-width: auto;
                margin-bottom: 8px;
            }
        }
    </style>
</head>
<body>
    <div class="email-wrapper">
        <div class="email-header">
            <h1>📧 New Contact Form Submission</h1>
            <div class="subtitle">GNX Software Solutions</div>
            <div class="priority-badge priority-{{ submission.priority }}">
                {{ submission.get_priority_display }} Priority
            </div>
        </div>
        
        <div class="email-body">
            <div class="section">
                <div class="section-header">
                    <h3>
                        <span class="section-icon">📋</span>
                        Submission Details
                    </h3>
                </div>
                <div class="section-body">
                    <div class="field">
                        <span class="field-label">Submission ID:</span>
                        <span class="field-value"><strong>#{{ submission.id }}</strong></span>
                    </div>
                    <div class="field">
                        <span class="field-label">Priority:</span>
                        <span class="field-value">
                            <span class="priority-badge priority-{{ submission.priority }}" style="font-size: 11px; padding: 6px 12px;">
                                {{ submission.get_priority_display }}
                            </span>
                        </span>
                    </div>
                    <div class="field">
                        <span class="field-label">Status:</span>
                        <span class="field-value">{{ submission.get_status_display }}</span>
                    </div>
                    <div class="field">
                        <span class="field-label">Submitted:</span>
                        <span class="field-value">{{ submission.created_at|date:"F d, Y \a\t g:i A" }}</span>
                    </div>
                </div>
            </div>

            <div class="section">
                <div class="section-header">
                    <h3>
                        <span class="section-icon">👤</span>
                        Contact Information
                    </h3>
                </div>
                <div class="section-body">
                    <div class="field">
                        <span class="field-label">Name:</span>
                        <span class="field-value"><strong>{{ submission.full_name }}</strong></span>
                    </div>
                    <div class="field">
                        <span class="field-label">Email:</span>
                        <span class="field-value">
                            <a href="mailto:{{ submission.email }}">{{ submission.email }}</a>
                        </span>
                    </div>
                    {% if submission.phone %}
                    <div class="field">
                        <span class="field-label">Phone:</span>
                        <span class="field-value">
                            <a href="tel:{{ submission.phone }}">{{ submission.phone }}</a>
                        </span>
                    </div>
                    {% endif %}
                </div>
            </div>

            <div class="section">
                <div class="section-header">
                    <h3>
                        <span class="section-icon">🏢</span>
                        Company Information
                    </h3>
                </div>
                <div class="section-body">
                    <div class="field">
                        <span class="field-label">Company:</span>
                        <span class="field-value"><strong>{{ submission.company }}</strong></span>
                    </div>
                    <div class="field">
                        <span class="field-label">Job Title:</span>
                        <span class="field-value">{{ submission.job_title }}</span>
                    </div>
                    {% if submission.industry %}
                    <div class="field">
                        <span class="field-label">Industry:</span>
                        <span class="field-value">{{ submission.get_industry_display }}</span>
                    </div>
                    {% endif %}
                    {% if submission.company_size %}
                    <div class="field">
                        <span class="field-label">Company Size:</span>
                        <span class="field-value">{{ submission.get_company_size_display }}</span>
                    </div>
                    {% endif %}
                </div>
            </div>

            <div class="section">
                <div class="section-header">
                    <h3>
                        <span class="section-icon">🎯</span>
                        Project Details
                    </h3>
                </div>
                <div class="section-body">
                    {% if submission.project_type %}
                    <div class="field">
                        <span class="field-label">Project Type:</span>
                        <span class="field-value">{{ submission.get_project_type_display }}</span>
                    </div>
                    {% endif %}
                    {% if submission.timeline %}
                    <div class="field">
                        <span class="field-label">Timeline:</span>
                        <span class="field-value">{{ submission.get_timeline_display }}</span>
                    </div>
                    {% endif %}
                    {% if submission.budget %}
                    <div class="field">
                        <span class="field-label">Budget:</span>
                        <span class="field-value"><strong>{{ submission.get_budget_display }}</strong></span>
                    </div>
                    {% endif %}
                    <div class="field">
                        <span class="field-label">Message:</span>
                        <div class="message-content">
                            {{ submission.message|linebreaks }}
                        </div>
                    </div>
                </div>
            </div>

            {% if submission.newsletter_subscription or submission.privacy_consent %}
            <div class="section">
                <div class="section-header">
                    <h3>
                        <span class="section-icon">✅</span>
                        Preferences
                    </h3>
                </div>
                <div class="section-body">
                    {% if submission.newsletter_subscription %}
                    <div class="field">
                        <span class="field-label">Newsletter Subscription:</span>
                        <span class="field-value">✅ Yes</span>
                    </div>
                    {% endif %}
                    {% if submission.privacy_consent %}
                    <div class="field">
                        <span class="field-label">Privacy Policy Consent:</span>
                        <span class="field-value">✅ Yes</span>
                    </div>
                    {% endif %}
                </div>
            </div>
            {% endif %}
        </div>
        
        <div class="email-footer">
            <div class="footer-company">GNX Software Solutions</div>
            <div class="footer-tagline">Contact Form Notification</div>
            
            <div class="footer-note">
                📧 This email was automatically generated from the GNX website contact form.<br>
                ⏰ Please respond to the customer within 24 hours as per our service commitment.
            </div>
            
            <div class="company-info">
                <p><strong>GNX Software Solutions</strong></p>
                <p>Email: support@gnxsoft.com | Web: gnxsoft.com</p>
            </div>
        </div>
    </div>
</body>
</html>
