<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>New Job Application - 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: 800px;
            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, #2C3E50 0%, #34495e 50%, #1a252f 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.1) 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 .job-title {
            color: rgba(255, 255, 255, 0.9);
            font-size: 18px;
            margin-top: 12px;
            font-weight: 400;
            position: relative;
            z-index: 2;
        }
        
        .email-body {
            padding: 50px 40px;
            background: #ffffff;
        }
        
        .section {
            background: #ffffff;
            border: 1px solid #e9ecef;
            border-left: 4px solid #3498db;
            padding: 28px;
            margin: 25px 0;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }
        
        .section h3 {
            margin-top: 0;
            color: #2C3E50;
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e9ecef;
        }
        
        .info-row {
            margin: 15px 0;
            display: flex;
            align-items: flex-start;
        }
        
        .info-label {
            font-weight: 700;
            color: #555;
            min-width: 180px;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .info-value {
            color: #2c3e50;
            font-size: 15px;
            flex: 1;
            font-weight: 500;
        }
        
        .info-value a {
            color: #3498db;
            text-decoration: none;
            font-weight: 600;
        }
        
        .info-value a:hover {
            text-decoration: underline;
        }
        
        .cover-letter {
            background: linear-gradient(135deg, #f0f0f0 0%, #f8f8f8 100%);
            padding: 25px;
            border-radius: 8px;
            white-space: pre-wrap;
            margin-top: 15px;
            line-height: 1.8;
            color: #334155;
            border-left: 4px solid #daa520;
        }
        
        .links {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 15px;
        }
        
        .links a {
            display: inline-block;
            padding: 10px 20px;
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: #ffffff !important;
            text-decoration: none;
            border-radius: 6px;
            font-weight: 600;
            font-size: 14px;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            transition: all 0.3s ease;
        }
        
        .links a:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
        }
        
        .resume-notice {
            background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
            border-left: 4px solid #f59e0b;
            padding: 20px 25px;
            border-radius: 8px;
            margin-top: 30px;
            text-align: center;
        }
        
        .resume-notice strong {
            color: #92400e;
            font-size: 16px;
            display: block;
            margin-bottom: 8px;
        }
        
        .resume-notice p {
            color: #78350f;
            font-size: 14px;
            margin: 0;
            line-height: 1.6;
        }
        
        .email-footer {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            padding: 40px;
            text-align: center;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .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: 12px;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 25px;
            line-height: 1.6;
        }
        
        @media (max-width: 600px) {
            body {
                padding: 20px 10px;
            }
            
            .email-header {
                padding: 40px 25px;
            }
            
            .email-header h1 {
                font-size: 26px;
            }
            
            .email-body {
                padding: 35px 25px;
            }
            
            .info-row {
                flex-direction: column;
            }
            
            .info-label {
                min-width: auto;
                margin-bottom: 6px;
            }
            
            .links {
                flex-direction: column;
            }
            
            .links a {
                width: 100%;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <div class="email-wrapper">
        <div class="email-header">
            <h1>🎯 New Job Application</h1>
            <div class="job-title">{{ job_title }}</div>
        </div>
        
        <div class="email-body">
            <div class="section">
                <h3>👤 Applicant Information</h3>
                <div class="info-row">
                    <span class="info-label">Name:</span>
                    <span class="info-value">{{ applicant_name }}</span>
                </div>
                <div class="info-row">
                    <span class="info-label">Email:</span>
                    <span class="info-value"><a href="mailto:{{ applicant_email }}">{{ applicant_email }}</a></span>
                </div>
                {% if applicant_phone %}
                <div class="info-row">
                    <span class="info-label">Phone:</span>
                    <span class="info-value">{{ applicant_phone }}</span>
                </div>
                {% endif %}
            </div>
            
            <div class="section">
                <h3>💼 Professional Information</h3>
                {% if current_position %}
                <div class="info-row">
                    <span class="info-label">Current Position:</span>
                    <span class="info-value">{{ current_position }}</span>
                </div>
                {% endif %}
                {% if current_company %}
                <div class="info-row">
                    <span class="info-label">Current Company:</span>
                    <span class="info-value">{{ current_company }}</span>
                </div>
                {% endif %}
                {% if years_of_experience %}
                <div class="info-row">
                    <span class="info-label">Years of Experience:</span>
                    <span class="info-value">{{ years_of_experience }}</span>
                </div>
                {% endif %}
            </div>
            
            <div class="section">
                <h3>📋 Application Details</h3>
                <div class="info-row">
                    <span class="info-label">Position Applied:</span>
                    <span class="info-value">{{ job_title }}</span>
                </div>
                <div class="info-row">
                    <span class="info-label">Application Date:</span>
                    <span class="info-value">{{ application_date|date:"F d, Y at h:i A" }}</span>
                </div>
                {% if expected_salary %}
                <div class="info-row">
                    <span class="info-label">Expected Salary:</span>
                    <span class="info-value">{{ expected_salary }} {{ salary_currency }}</span>
                </div>
                {% endif %}
                {% if available_from %}
                <div class="info-row">
                    <span class="info-label">Available From:</span>
                    <span class="info-value">{{ available_from|date:"F d, Y" }}</span>
                </div>
                {% endif %}
                {% if notice_period %}
                <div class="info-row">
                    <span class="info-label">Notice Period:</span>
                    <span class="info-value">{{ notice_period }}</span>
                </div>
                {% endif %}
            </div>
            
            {% if portfolio_url or linkedin_url or github_url or website_url %}
            <div class="section">
                <h3>🔗 Links</h3>
                <div class="links">
                    {% if portfolio_url %}<a href="{{ portfolio_url }}" target="_blank">📁 Portfolio</a>{% endif %}
                    {% if linkedin_url %}<a href="{{ linkedin_url }}" target="_blank">💼 LinkedIn</a>{% endif %}
                    {% if github_url %}<a href="{{ github_url }}" target="_blank">💻 GitHub</a>{% endif %}
                    {% if website_url %}<a href="{{ website_url }}" target="_blank">🌐 Website</a>{% endif %}
                </div>
            </div>
            {% endif %}
            
            {% if cover_letter %}
            <div class="section">
                <h3>✉️ Cover Letter</h3>
                <div class="cover-letter">{{ cover_letter }}</div>
            </div>
            {% endif %}
            
            <div class="resume-notice">
                <strong>📎 Resume is attached to this email.</strong>
                <p>Please log in to the admin panel to review the full application and update its status.</p>
            </div>
        </div>
        
        <div class="email-footer">
            <div class="footer-company">GNX Software Solutions</div>
            <div class="footer-tagline">Human Resources Department</div>
            
            <div class="footer-note">
                This is an automated notification for new job applications.<br>
                Please review the application in the admin panel.
            </div>
        </div>
    </div>
</body>
</html>
