{% extends "base.html" %}
{% load static %}

{% block title %}Add Vaccination Record - {{ project_name }}{% endblock %}

{% block content %}
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-lg-6">
            <div class="glass-card shadow-lg p-4 p-md-5">
                <div class="text-center mb-4">
                    <div class="icon-box bg-danger bg-opacity-10 text-danger rounded-circle d-inline-flex p-3 mb-3">
                        <i class="bi bi-shield-plus fs-1"></i>
                    </div>
                    <h2 class="brand-font text-dark">Add Vaccine Record</h2>
                    <p class="text-secondary">Keep your immunization data accurate and up to date.</p>
                </div>

                <form method="POST" enctype="multipart/form-data">
                    {% csrf_token %}
                    
                    <div class="mb-3">
                        <label class="form-label text-dark fw-bold">Vaccine Name</label>
                        <select name="vaccine_name" class="form-select bg-light border-secondary text-dark" required>
                            <option value="">Select Vaccine...</option>
                            <option value="COVID-19 (Covishield/AstraZeneca)">COVID-19 (Covishield/AstraZeneca)</option>
                            <option value="COVID-19 (Vero Cell)">COVID-19 (Vero Cell)</option>
                            <option value="COVID-19 (Pfizer/BioNTech)">COVID-19 (Pfizer/BioNTech)</option>
                            <option value="COVID-19 (Moderna)">COVID-19 (Moderna)</option>
                            <option value="COVID-19 (Johnson & Johnson)">COVID-19 (Johnson & Johnson)</option>
                            <option value="Hepatitis B">Hepatitis B</option>
                            <option value="Influenza (Flu)">Influenza (Flu)</option>
                            <option value="HPV">HPV</option>
                            <option value="Tetanus">Tetanus</option>
                            <option value="Other">Other</option>
                        </select>
                    </div>

                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label class="form-label text-dark fw-bold">Dose Number</label>
                            <input type="number" name="dose_number" class="form-control bg-light border-secondary text-dark" min="1" value="1" required>
                        </div>
                        <div class="col-md-6 mb-3">
                            <label class="form-label text-dark fw-bold">Date Taken</label>
                            <input type="date" name="date_taken" class="form-control bg-light border-secondary text-dark" required>
                        </div>
                    </div>

                    <div class="mb-3">
                        <label class="form-label text-dark fw-bold">City/District</label>
                        <input type="text" name="location" class="form-control bg-light border-secondary text-dark" placeholder="e.g. Kathmandu" required>
                    </div>

                    <div class="mb-3">
                        <label class="form-label text-dark fw-bold">Center Name</label>
                        <input type="text" name="center_name" class="form-control bg-light border-secondary text-dark" placeholder="e.g. Teaching Hospital">
                    </div>

                    <div class="mb-3">
                        <label class="form-label text-dark fw-bold">Certificate Photo (Optional)</label>
                        <input type="file" name="photo" class="form-control bg-light border-secondary text-dark" accept="image/*">
                    </div>

                    <div class="mb-4">
                        <label class="form-label text-dark fw-bold">Notes (Optional)</label>
                        <textarea name="notes" class="form-control bg-light border-secondary text-dark" rows="3" placeholder="Any side effects or remarks..."></textarea>
                    </div>

                    <div class="d-grid gap-2">
                        <button type="submit" class="btn btn-danger py-3 rounded-pill fw-bold shadow-sm">Save Record</button>
                        <a href="{% url 'vaccination_dashboard' %}" class="btn btn-light py-3 rounded-pill fw-bold">Cancel</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
