@extends('layouts.app')
@section('title', 'Report Builder')
@section('content')
    <x-page-head title="Report Builder" subtitle="Custom queries & exports" />
    <x-panel>
        <form method="GET" action="{{ route('system.report-builder.export') }}" style="display:flex; gap:12px; align-items:end;">
            <div class="form-group" style="flex:1;">
                <label class="form-label">Query Template</label>
                <select class="input" name="query" required>
                    @foreach ($queries as $query)
                        <option value="{{ $query }}">{{ ucfirst($query) }}</option>
                    @endforeach
                </select>
            </div>
            <button type="submit" class="btn btn-primary">Export CSV</button>
        </form>
        <p style="color:var(--text3); margin-top:12px;">Exports up to 5,000 rows from live database tables.</p>
    </x-panel>
@endsection
