{% extends "ui/templates/base/layout.html" %}
{% block content %}
<div class="max-w-4xl space-y-6"><h1 class="text-2xl font-semibold">New Platform Billing Account</h1><form method="post" class="space-y-4 rounded-2xl border bg-white p-5 shadow-soft"><input type="hidden" name="csrf_token" value="{{ csrf_token }}" />
<div class="grid gap-4 md:grid-cols-2"><label class="text-sm">Account Type<select name="account_type" class="mt-1 w-full rounded-xl border px-3 py-2">{% for x in account_types %}<option value="{{ x }}">{{ x }}</option>{% endfor %}</select></label><label class="text-sm">Account Code<input name="account_code" required class="mt-1 w-full rounded-xl border px-3 py-2" /></label><label class="text-sm md:col-span-2">Display Name<input name="display_name" required class="mt-1 w-full rounded-xl border px-3 py-2" /></label><label class="text-sm">Link Audit Firm<select name="tenant_id" class="mt-1 w-full rounded-xl border px-3 py-2"><option value="">Not linked</option>{% for t in audit_firms %}<option value="{{ t.id }}">{{ t.name }} ({{ t.code }})</option>{% endfor %}</select></label><label class="text-sm">Link Client<select name="client_id" class="mt-1 w-full rounded-xl border px-3 py-2"><option value="">Not linked</option>{% for c in clients %}<option value="{{ c.id }}">{{ c.client_name }} ({{ c.client_code }})</option>{% endfor %}</select></label><label class="text-sm">Link Consultant<select name="consultant_id" class="mt-1 w-full rounded-xl border px-3 py-2"><option value="">Not linked</option>{% for c in consultants %}<option value="{{ c.id }}">{{ c.contact_person }}{% if c.firm_name %} - {{ c.firm_name }}{% endif %}</option>{% endfor %}</select></label><label class="text-sm">Email<input name="email" class="mt-1 w-full rounded-xl border px-3 py-2" /></label><label class="text-sm">Mobile<input name="mobile" class="mt-1 w-full rounded-xl border px-3 py-2" /></label><label class="text-sm">GSTIN<input name="gstin" class="mt-1 w-full rounded-xl border px-3 py-2" /></label><label class="text-sm">PAN<input name="pan" class="mt-1 w-full rounded-xl border px-3 py-2" /></label><label class="text-sm">State<input name="state" class="mt-1 w-full rounded-xl border px-3 py-2" /></label></div><label class="block text-sm">Billing Address<textarea name="billing_address" class="mt-1 w-full rounded-xl border px-3 py-2"></textarea></label><label class="block text-sm">Notes<textarea name="notes" class="mt-1 w-full rounded-xl border px-3 py-2"></textarea></label><button class="rounded-xl bg-brand-600 px-4 py-2 text-sm font-semibold text-white">Save Account</button></form></div>
{% endblock %}
