<div class="grid md:grid-cols-2 gap-5">
    <div>
        <label class="text-sm font-medium">Partner name</label>
        <input name="name" value="{{ old('name', $ourPartner->name ?? '') }}" class="w-full mt-1 rounded border-gray-300" required>
        @error('name') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror
    </div>

    <div>
        <label class="text-sm font-medium">Website URL <span class="text-gray-400 font-normal">(optional)</span></label>
        <input type="url" name="website_url" value="{{ old('website_url', $ourPartner->website_url ?? '') }}" placeholder="https://example.com" class="w-full mt-1 rounded border-gray-300">
        @error('website_url') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror
    </div>

    <div>
        <label class="text-sm font-medium">Sort order</label>
        <input type="number" min="0" name="sort_order" value="{{ old('sort_order', $ourPartner->sort_order ?? 0) }}" class="w-full mt-1 rounded border-gray-300">
        @error('sort_order') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror

        <label class="inline-flex items-center gap-2 mt-4 text-sm">
            <input type="checkbox" name="is_active" value="1" {{ old('is_active', $ourPartner->is_active ?? true) ? 'checked' : '' }}>
            Active
        </label>
    </div>

    <div>
        <label class="text-sm font-medium">Partner logo <span class="text-gray-400 font-normal">(optional)</span></label>
        <input type="file" name="logo" accept="image/*" class="w-full mt-1 rounded border-gray-300">
        @error('logo') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror
        @if(!empty($ourPartner?->logo_url))
            <img src="{{ $ourPartner->logo_url }}" class="mt-3 h-16 w-36 rounded border border-gray-200 bg-white object-contain p-2" alt="{{ $ourPartner->name }}">
        @endif
        <p class="text-xs text-gray-500 mt-2">PNG, JPG, SVG. Transparent background recommended.</p>
    </div>
</div>
